Commit f04f7415 authored by Rémy Coutable's avatar Rémy Coutable

Fix flaky tests assuming array order

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent f76d3eb7
...@@ -59,7 +59,7 @@ RSpec.describe Namespaces::ProjectsFinder do ...@@ -59,7 +59,7 @@ RSpec.describe Namespaces::ProjectsFinder do
let(:params) { { sort: :similarity, search: 'test' } } let(:params) { { sort: :similarity, search: 'test' } }
it 'returns projects by similarity' do it 'returns projects by similarity' do
expect(projects).to eq([project_2, project_4]) expect(projects).to contain_exactly(project_2, project_4)
end end
end end
...@@ -67,7 +67,7 @@ RSpec.describe Namespaces::ProjectsFinder do ...@@ -67,7 +67,7 @@ RSpec.describe Namespaces::ProjectsFinder do
let(:params) { { sort: :similarity } } let(:params) { { sort: :similarity } }
it 'returns all projects' do it 'returns all projects' do
expect(projects).to eq([project_1, project_2, project_4]) expect(projects).to contain_exactly(project_1, project_2, project_4)
end end
end end
...@@ -75,7 +75,7 @@ RSpec.describe Namespaces::ProjectsFinder do ...@@ -75,7 +75,7 @@ RSpec.describe Namespaces::ProjectsFinder do
let(:params) { { search: 'test' } } let(:params) { { search: 'test' } }
it 'returns matching projects' do it 'returns matching projects' do
expect(projects).to eq([project_2, project_4]) expect(projects).to contain_exactly(project_2, project_4)
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