diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-23 15:09:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-23 15:09:47 +0300 |
commit | 8f9beefac3774b30e911fb00a68f4c7a5244cf27 (patch) | |
tree | 919c3a043f8c10bc3f78f3f6e029acfb6b972556 /spec/finders/autocomplete | |
parent | e4bf776a8829e5186a0f63603c0be627b891d80e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/finders/autocomplete')
-rw-r--r-- | spec/finders/autocomplete/move_to_project_finder_spec.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/finders/autocomplete/move_to_project_finder_spec.rb b/spec/finders/autocomplete/move_to_project_finder_spec.rb index f997dd32c40..9129a3b65be 100644 --- a/spec/finders/autocomplete/move_to_project_finder_spec.rb +++ b/spec/finders/autocomplete/move_to_project_finder_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' describe Autocomplete::MoveToProjectFinder do - let(:user) { create(:user) } - let(:project) { create(:project) } + let_it_be(:user) { create(:user) } + let_it_be(:project) { create(:project) } let(:no_access_project) { create(:project) } let(:guest_project) { create(:project) } @@ -92,6 +92,15 @@ describe Autocomplete::MoveToProjectFinder do expect(described_class.new(user, project_id: project.id, search: 'wadus').execute.to_a) .to eq([wadus_project]) end + + it 'allows searching by parent namespace' do + group = create(:group) + other_project = create(:project, group: group) + other_project.add_maintainer(user) + + expect(described_class.new(user, project_id: project.id, search: group.name).execute.to_a) + .to contain_exactly(other_project) + end end end end |