Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-07-12 14:50:27 +0300
committerDouwe Maan <douwe@gitlab.com>2018-07-12 14:50:27 +0300
commit2f83794d2b727594676e25e85ada53e33cf5246a (patch)
treec42d926778e82bd66783f43f2020b656bda80d61 /spec/helpers
parent94627fd7e3b4010e12f7a0698494b2c36c4f76ef (diff)
parent751e1786dfe727c11ddae28e77be6eb88fbfbbf9 (diff)
Merge branch 'dz-manifest-import' into 'master'
Add manifest import See merge request gitlab-org/gitlab-ce!20304
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/namespaces_helper_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/helpers/namespaces_helper_spec.rb b/spec/helpers/namespaces_helper_spec.rb
index 460d3b6a7e4..343e140f5fb 100644
--- a/spec/helpers/namespaces_helper_spec.rb
+++ b/spec/helpers/namespaces_helper_spec.rb
@@ -28,6 +28,16 @@ describe NamespacesHelper do
expect(options).not_to include(admin_group.name)
expect(options).to include(user_group.name)
+ expect(options).to include(user.name)
+ end
+
+ it 'returns only groups if groups_only option is true' do
+ allow(helper).to receive(:current_user).and_return(user)
+
+ options = helper.namespaces_options(nil, groups_only: true)
+
+ expect(options).not_to include(user.name)
+ expect(options).to include(user_group.name)
end
context 'when nested groups are available', :nested_groups do