diff options
Diffstat (limited to 'spec/helpers/namespaces_helper_spec.rb')
-rw-r--r-- | spec/helpers/namespaces_helper_spec.rb | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/spec/helpers/namespaces_helper_spec.rb b/spec/helpers/namespaces_helper_spec.rb index 6eb560e3f5c..00aa0fd1cba 100644 --- a/spec/helpers/namespaces_helper_spec.rb +++ b/spec/helpers/namespaces_helper_spec.rb @@ -188,44 +188,6 @@ RSpec.describe NamespacesHelper do helper.namespaces_options end end - - describe 'include_groups_with_developer_maintainer_access parameter' do - context 'when DEVELOPER_MAINTAINER_PROJECT_ACCESS is set for a project' do - let!(:admin_project_creation_level) { ::Gitlab::Access::DEVELOPER_MAINTAINER_PROJECT_ACCESS } - - it 'returns groups where user is a developer' do - allow(helper).to receive(:current_user).and_return(user) - stub_application_setting(default_project_creation: ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS) - admin_group.add_user(user, GroupMember::DEVELOPER) - - options = helper.namespaces_options_with_developer_maintainer_access - - expect(options).to include(admin_group.name) - expect(options).not_to include(subgroup1.name) - expect(options).to include(subgroup2.name) - expect(options).not_to include(subgroup3.name) - expect(options).to include(user_group.name) - expect(options).to include(user.name) - end - end - - context 'when DEVELOPER_MAINTAINER_PROJECT_ACCESS is set globally' do - it 'return groups where default is not overridden' do - allow(helper).to receive(:current_user).and_return(user) - stub_application_setting(default_project_creation: ::Gitlab::Access::DEVELOPER_MAINTAINER_PROJECT_ACCESS) - admin_group.add_user(user, GroupMember::DEVELOPER) - - options = helper.namespaces_options_with_developer_maintainer_access - - expect(options).to include(admin_group.name) - expect(options).to include(subgroup1.name) - expect(options).to include(subgroup2.name) - expect(options).not_to include(subgroup3.name) - expect(options).to include(user_group.name) - expect(options).to include(user.name) - end - end - end end describe '#cascading_namespace_settings_popover_data' do |