Commit 84dbfc94 authored by Stan Hu's avatar Stan Hu

Merge branch 'fix-flaky-tests' into 'master'

Fix flaky tests assuming array order

See merge request gitlab-org/gitlab!56089
parents 0cb17392 f04f7415
......@@ -59,7 +59,7 @@ RSpec.describe Namespaces::ProjectsFinder do
let(:params) { { sort: :similarity, search: 'test' } }
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
......@@ -67,7 +67,7 @@ RSpec.describe Namespaces::ProjectsFinder do
let(:params) { { sort: :similarity } }
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
......@@ -75,7 +75,7 @@ RSpec.describe Namespaces::ProjectsFinder do
let(:params) { { search: 'test' } }
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
......
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