diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-07-12 14:50:27 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-07-12 14:50:27 +0300 |
commit | 2f83794d2b727594676e25e85ada53e33cf5246a (patch) | |
tree | c42d926778e82bd66783f43f2020b656bda80d61 /spec/helpers | |
parent | 94627fd7e3b4010e12f7a0698494b2c36c4f76ef (diff) | |
parent | 751e1786dfe727c11ddae28e77be6eb88fbfbbf9 (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.rb | 10 |
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 |