diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-08-12 12:04:55 +1200 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-08-12 12:04:55 +1200 |
commit | b56f28501242ef9e1ab167693c575b16487cfd3a (patch) | |
tree | e4dc0de881d5602d21c491df1f532ebb004642e0 /spec/support/shared_examples | |
parent | 7daf1f41bee701b17a2f276b41f2f96a364cf03d (diff) | |
download | gitlab-ce-b56f28501242ef9e1ab167693c575b16487cfd3a.tar.gz |
Improve cluster policy spec coveragespec_cluster_policy_coverage
Diffstat (limited to 'spec/support/shared_examples')
-rw-r--r-- | spec/support/shared_examples/policies/clusterable_shared_examples.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/shared_examples/policies/clusterable_shared_examples.rb b/spec/support/shared_examples/policies/clusterable_shared_examples.rb index 4f9873d53e4..0b427c23256 100644 --- a/spec/support/shared_examples/policies/clusterable_shared_examples.rb +++ b/spec/support/shared_examples/policies/clusterable_shared_examples.rb @@ -13,7 +13,11 @@ shared_examples 'clusterable policies' do clusterable.add_developer(current_user) end + it { expect_disallowed(:read_cluster) } it { expect_disallowed(:add_cluster) } + it { expect_disallowed(:create_cluster) } + it { expect_disallowed(:update_cluster) } + it { expect_disallowed(:admin_cluster) } end context 'with a maintainer' do @@ -22,7 +26,11 @@ shared_examples 'clusterable policies' do end context 'with no clusters' do + it { expect_allowed(:read_cluster) } it { expect_allowed(:add_cluster) } + it { expect_allowed(:create_cluster) } + it { expect_allowed(:update_cluster) } + it { expect_allowed(:admin_cluster) } end end end |