Commit 2894f293 authored by Shinya Maeda's avatar Shinya Maeda

Use eq instead of match_array for comparison of array

parent d1ca5f46
...@@ -28,7 +28,7 @@ describe PipelinesFinder do ...@@ -28,7 +28,7 @@ describe PipelinesFinder do
end end
it 'orders in descending order on ID' do it 'orders in descending order on ID' do
expect(subject).to match_array(Ci::Pipeline.order(id: :desc)) expect(subject).to eq(Ci::Pipeline.order(id: :desc))
end end
end end
...@@ -209,7 +209,7 @@ describe PipelinesFinder do ...@@ -209,7 +209,7 @@ describe PipelinesFinder do
let(:params) { { order_by: 'created_at', sort: 'asc' } } let(:params) { { order_by: 'created_at', sort: 'asc' } }
it 'sorts by created_at asc' do it 'sorts by created_at asc' do
expect(subject).to match_array(Ci::Pipeline.order(created_at: :asc)) expect(subject).to eq(Ci::Pipeline.order(created_at: :asc))
end end
end end
...@@ -217,7 +217,7 @@ describe PipelinesFinder do ...@@ -217,7 +217,7 @@ describe PipelinesFinder do
let(:params) { { order_by: 'created_at', sort: 'desc' } } let(:params) { { order_by: 'created_at', sort: 'desc' } }
it 'sorts by created_at desc' do it 'sorts by created_at desc' do
expect(subject).to match_array(Ci::Pipeline.order(created_at: :desc)) expect(subject).to eq(Ci::Pipeline.order(created_at: :desc))
end end
end end
...@@ -225,7 +225,7 @@ describe PipelinesFinder do ...@@ -225,7 +225,7 @@ describe PipelinesFinder do
let(:params) { { order_by: 'invalid_column', sort: 'desc' } } let(:params) { { order_by: 'invalid_column', sort: 'desc' } }
it 'sorts by default' do it 'sorts by default' do
expect(subject).to match_array(Ci::Pipeline.order(id: :desc)) expect(subject).to eq(Ci::Pipeline.order(id: :desc))
end end
end end
...@@ -233,7 +233,7 @@ describe PipelinesFinder do ...@@ -233,7 +233,7 @@ describe PipelinesFinder do
let(:params) { { order_by: 'created_at', sort: 'invalid_sort' } } let(:params) { { order_by: 'created_at', sort: 'invalid_sort' } }
it 'sorts by default' do it 'sorts by default' do
expect(subject).to match_array(Ci::Pipeline.order(id: :desc)) expect(subject).to eq(Ci::Pipeline.order(id: :desc))
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment