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:
authorBob Van Landuyt <bob@gitlab.com>2019-08-13 12:14:06 +0300
committerBob Van Landuyt <bob@gitlab.com>2019-08-13 12:14:06 +0300
commit3770f3fb300ee01fca9735fdf1e5cd940ace4452 (patch)
tree676a3653e575b6f54873b655bf188b46ae8c79e3 /spec/support
parent0297f1c2b862edbe8015874913ebbab1393706e4 (diff)
parentb56f28501242ef9e1ab167693c575b16487cfd3a (diff)
Merge branch 'spec_cluster_policy_coverage' into 'master'
Improve cluster policy spec coverage See merge request gitlab-org/gitlab-ce!31700
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/shared_examples/policies/clusterable_shared_examples.rb8
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