diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-08 12:11:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-08 12:11:30 +0000 |
commit | 012f9a4b9ec4a78d9593d882b38f95e376c2cfe2 (patch) | |
tree | 07f1df76cb12d94744e8069eec540d36092bbaba /spec/policies/metrics | |
parent | 3c050fb24b757425987a7df4cb3497e1d792be8e (diff) | |
download | gitlab-ce-012f9a4b9ec4a78d9593d882b38f95e376c2cfe2.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies/metrics')
-rw-r--r-- | spec/policies/metrics/dashboard/annotation_policy_spec.rb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/spec/policies/metrics/dashboard/annotation_policy_spec.rb b/spec/policies/metrics/dashboard/annotation_policy_spec.rb index 9ea9f843f2c..2d1ef0ee0cb 100644 --- a/spec/policies/metrics/dashboard/annotation_policy_spec.rb +++ b/spec/policies/metrics/dashboard/annotation_policy_spec.rb @@ -14,9 +14,7 @@ RSpec.describe Metrics::Dashboard::AnnotationPolicy, :models do end it { expect(policy).to be_disallowed :read_metrics_dashboard_annotation } - it { expect(policy).to be_disallowed :create_metrics_dashboard_annotation } - it { expect(policy).to be_disallowed :update_metrics_dashboard_annotation } - it { expect(policy).to be_disallowed :delete_metrics_dashboard_annotation } + it { expect(policy).to be_disallowed :admin_metrics_dashboard_annotation } end context 'when reporter' do @@ -25,9 +23,7 @@ RSpec.describe Metrics::Dashboard::AnnotationPolicy, :models do end it { expect(policy).to be_allowed :read_metrics_dashboard_annotation } - it { expect(policy).to be_disallowed :create_metrics_dashboard_annotation } - it { expect(policy).to be_disallowed :update_metrics_dashboard_annotation } - it { expect(policy).to be_disallowed :delete_metrics_dashboard_annotation } + it { expect(policy).to be_disallowed :admin_metrics_dashboard_annotation } end context 'when developer' do @@ -36,9 +32,7 @@ RSpec.describe Metrics::Dashboard::AnnotationPolicy, :models do end it { expect(policy).to be_allowed :read_metrics_dashboard_annotation } - it { expect(policy).to be_allowed :create_metrics_dashboard_annotation } - it { expect(policy).to be_allowed :update_metrics_dashboard_annotation } - it { expect(policy).to be_allowed :delete_metrics_dashboard_annotation } + it { expect(policy).to be_allowed :admin_metrics_dashboard_annotation } end context 'when maintainer' do @@ -47,9 +41,7 @@ RSpec.describe Metrics::Dashboard::AnnotationPolicy, :models do end it { expect(policy).to be_allowed :read_metrics_dashboard_annotation } - it { expect(policy).to be_allowed :create_metrics_dashboard_annotation } - it { expect(policy).to be_allowed :update_metrics_dashboard_annotation } - it { expect(policy).to be_allowed :delete_metrics_dashboard_annotation } + it { expect(policy).to be_allowed :admin_metrics_dashboard_annotation } end end |