diff options
author | Fabio Papa <fabtheman@gmail.com> | 2019-06-16 23:22:12 +0300 |
---|---|---|
committer | Fabio Papa <fabtheman@gmail.com> | 2019-07-19 21:55:45 +0300 |
commit | e6e672f049aa887cc4765eb9dfd9f7ac320d5188 (patch) | |
tree | 9015d124626e4661c7edf3c3d85ef61d1a36d79a /spec | |
parent | 11f998d9f250bf63abdebc1e0934b39d62f349f6 (diff) |
Modify API spec to expect a maintainer to be able to create subgroup
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/groups_spec.rb | 4 | ||||
-rw-r--r-- | spec/support/shared_contexts/policies/group_policy_shared_context.rb | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb index c41408fba65..52d926d5484 100644 --- a/spec/requests/api/groups_spec.rb +++ b/spec/requests/api/groups_spec.rb @@ -803,10 +803,10 @@ describe API::Groups do group2.add_maintainer(user1) end - it 'cannot create subgroups' do + it 'can create subgroups' do post api("/groups", user1), params: { parent_id: group2.id, name: 'foo', path: 'foo' } - expect(response).to have_gitlab_http_status(403) + expect(response).to have_gitlab_http_status(201) end end end diff --git a/spec/support/shared_contexts/policies/group_policy_shared_context.rb b/spec/support/shared_contexts/policies/group_policy_shared_context.rb index b4b09d3295f..a40d3087f6e 100644 --- a/spec/support/shared_contexts/policies/group_policy_shared_context.rb +++ b/spec/support/shared_contexts/policies/group_policy_shared_context.rb @@ -19,10 +19,6 @@ RSpec.shared_context 'GroupPolicy context' do let(:reporter_permissions) { [:admin_label] } let(:developer_permissions) { [:admin_milestone] } let(:maintainer_permissions) do - %i[ - create_projects - read_cluster create_cluster update_cluster admin_cluster add_cluster - ] [ :create_projects, :read_cluster, |