summaryrefslogtreecommitdiff
path: root/spec/policies/alert_management/alert_policy_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/policies/alert_management/alert_policy_spec.rb')
-rw-r--r--spec/policies/alert_management/alert_policy_spec.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/policies/alert_management/alert_policy_spec.rb b/spec/policies/alert_management/alert_policy_spec.rb
index 698264e4ac7..523464d8ff1 100644
--- a/spec/policies/alert_management/alert_policy_spec.rb
+++ b/spec/policies/alert_management/alert_policy_spec.rb
@@ -6,17 +6,20 @@ describe AlertManagement::AlertPolicy, :models do
let(:alert) { create(:alert_management_alert) }
let(:project) { alert.project }
let(:user) { create(:user) }
- let(:policy) { described_class.new(user, alert) }
+
+ subject(:policy) { described_class.new(user, alert) }
describe 'rules' do
- it { expect(policy).to be_disallowed :read_alert_management_alerts }
+ it { is_expected.to be_disallowed :read_alert_management_alerts }
+ it { is_expected.to be_disallowed :update_alert_management_alerts }
context 'when developer' do
before do
project.add_developer(user)
end
- it { expect(policy).to be_allowed :read_alert_management_alerts }
+ it { is_expected.to be_allowed :read_alert_management_alerts }
+ it { is_expected.to be_allowed :update_alert_management_alerts }
end
end
end