summaryrefslogtreecommitdiff
path: root/spec/services/alert_management/create_alert_issue_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/alert_management/create_alert_issue_service_spec.rb')
-rw-r--r--spec/services/alert_management/create_alert_issue_service_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/alert_management/create_alert_issue_service_spec.rb b/spec/services/alert_management/create_alert_issue_service_spec.rb
index 083e5b8c6f1..7255a722d26 100644
--- a/spec/services/alert_management/create_alert_issue_service_spec.rb
+++ b/spec/services/alert_management/create_alert_issue_service_spec.rb
@@ -81,7 +81,7 @@ RSpec.describe AlertManagement::CreateAlertIssueService do
it 'checks permissions' do
execute
- expect(user).to have_received(:can?).with(:create_issue, project)
+ expect(user).to have_received(:can?).with(:create_issue, project).exactly(2).times
end
context 'with alert severity' do
@@ -161,7 +161,7 @@ RSpec.describe AlertManagement::CreateAlertIssueService do
it 'has an unsuccessful status' do
expect(execute).to be_error
- expect(execute.message).to eq("Title can't be blank")
+ expect(execute.errors).to contain_exactly("Title can't be blank")
end
end
@@ -170,7 +170,7 @@ RSpec.describe AlertManagement::CreateAlertIssueService do
it 'responds with error' do
expect(execute).to be_error
- expect(execute.message).to eq('Hosts hosts array is over 255 chars')
+ expect(execute.errors).to contain_exactly('Hosts hosts array is over 255 chars')
end
end