Commit ab0748dc authored by Gabriel Mazetto's avatar Gabriel Mazetto

Merge branch '235682-fix-flaky-move-to-project-finder-spec' into 'master'

Fixes flaky spec due to result ordering

Closes #235682

See merge request gitlab-org/gitlab!39294
parents 035c81a1 459e922a
......@@ -22,14 +22,14 @@ RSpec.describe Autocomplete::MoveToProjectFinder do
expect(finder.execute).to be_empty
end
it 'returns projects equal or above Gitlab::Access::REPORTER ordered by name' do
it 'returns projects equal or above Gitlab::Access::REPORTER' do
reporter_project.add_reporter(user)
developer_project.add_developer(user)
maintainer_project.add_maintainer(user)
finder = described_class.new(user, project_id: project.id)
expect(finder.execute.to_a).to eq([reporter_project, developer_project, maintainer_project])
expect(finder.execute.to_a).to contain_exactly(reporter_project, developer_project, maintainer_project)
end
it 'does not include the source project' do
......@@ -88,10 +88,10 @@ RSpec.describe Autocomplete::MoveToProjectFinder do
wadus_project.add_maintainer(user)
expect(described_class.new(user, project_id: project.id).execute.to_a)
.to eq([foo_project, wadus_project])
.to contain_exactly(foo_project, wadus_project)
expect(described_class.new(user, project_id: project.id, search: 'wadus').execute.to_a)
.to eq([wadus_project])
.to contain_exactly(wadus_project)
end
it 'allows searching by parent namespace' do
......
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