summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-03-17 22:22:50 +0900
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-03 02:11:51 +0900
commitc79c389525d8f31dfc9119a1eb6e9a41585facb9 (patch)
tree2fdf919a4cfc2fc7cddb1fcf4e2532b21af2d75b
parente72c50fcb2f60516284fb66aa322cd0880cbda80 (diff)
downloadgitlab-ce-c79c389525d8f31dfc9119a1eb6e9a41585facb9.tar.gz
Fix created_at to user_id in spec
-rw-r--r--spec/finders/pipelines_finder_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/finders/pipelines_finder_spec.rb b/spec/finders/pipelines_finder_spec.rb
index a218f315f79..b5cb7d75c5e 100644
--- a/spec/finders/pipelines_finder_spec.rb
+++ b/spec/finders/pipelines_finder_spec.rb
@@ -206,26 +206,26 @@ describe PipelinesFinder do
context 'when order_by and sort are passed' do
context 'when order_by and sort are valid' do
- let(:params) { { order_by: 'created_at', sort: 'asc' } }
+ let(:params) { { order_by: 'user_id', sort: 'asc' } }
it 'sorts pipelines by default' do
- expect(subject).to eq(Ci::Pipeline.order(created_at: :asc))
+ expect(subject).to eq(Ci::Pipeline.order(user_id: :asc))
end
end
context 'when order_by is invalid' do
- let(:params) { { order_by: 'invalid_column', sort: 'desc' } }
+ let(:params) { { order_by: 'invalid_column', sort: 'asc' } }
it 'sorts pipelines with default order_by (id:)' do
- expect(subject).to eq(Ci::Pipeline.order(id: :desc))
+ expect(subject).to eq(Ci::Pipeline.order(id: :asc))
end
end
context 'when sort is invalid' do
- let(:params) { { order_by: 'created_at', sort: 'invalid_sort' } }
+ let(:params) { { order_by: 'user_id', sort: 'invalid_sort' } }
it 'sorts pipelines with default sort (:desc)' do
- expect(subject).to eq(Ci::Pipeline.order(created_at: :desc))
+ expect(subject).to eq(Ci::Pipeline.order(user_id: :desc))
end
end