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/policies/clusters/instance_policy_spec.rb | |
parent | 7daf1f41bee701b17a2f276b41f2f96a364cf03d (diff) | |
download | gitlab-ce-b56f28501242ef9e1ab167693c575b16487cfd3a.tar.gz |
Improve cluster policy spec coveragespec_cluster_policy_coverage
Diffstat (limited to 'spec/policies/clusters/instance_policy_spec.rb')
-rw-r--r-- | spec/policies/clusters/instance_policy_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/policies/clusters/instance_policy_spec.rb b/spec/policies/clusters/instance_policy_spec.rb index 7b61819e079..2373fef8aa6 100644 --- a/spec/policies/clusters/instance_policy_spec.rb +++ b/spec/policies/clusters/instance_policy_spec.rb @@ -9,6 +9,8 @@ describe Clusters::InstancePolicy do describe 'rules' do context 'when user' do it { expect(policy).to be_disallowed :read_cluster } + it { expect(policy).to be_disallowed :add_cluster } + it { expect(policy).to be_disallowed :create_cluster } it { expect(policy).to be_disallowed :update_cluster } it { expect(policy).to be_disallowed :admin_cluster } end @@ -17,6 +19,8 @@ describe Clusters::InstancePolicy do let(:user) { create(:admin) } it { expect(policy).to be_allowed :read_cluster } + it { expect(policy).to be_allowed :add_cluster } + it { expect(policy).to be_allowed :create_cluster } it { expect(policy).to be_allowed :update_cluster } it { expect(policy).to be_allowed :admin_cluster } end |