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:
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.rb17
1 files changed, 1 insertions, 16 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 62afe777165..9bc8b731dc1 100644
--- a/spec/services/alert_management/create_alert_issue_service_spec.rb
+++ b/spec/services/alert_management/create_alert_issue_service_spec.rb
@@ -94,11 +94,7 @@ RSpec.describe AlertManagement::CreateAlertIssueService do
end
context 'when alert cannot be updated' do
- before do
- # invalidate alert
- too_many_hosts = Array.new(AlertManagement::Alert::HOSTS_MAX_LENGTH + 1) { |_| 'host' }
- alert.update_columns(hosts: too_many_hosts)
- end
+ let(:alert) { create(:alert_management_alert, :with_validation_errors, :triggered, project: project, payload: payload) }
it 'responds with error' do
expect(execute).to be_error
@@ -122,17 +118,6 @@ RSpec.describe AlertManagement::CreateAlertIssueService do
expect(execute.message).to eq(_('An issue already exists'))
end
end
-
- context 'when alert_management_create_alert_issue feature flag is disabled' do
- before do
- stub_feature_flags(alert_management_create_alert_issue: false)
- end
-
- it 'responds with error' do
- expect(execute).to be_error
- expect(execute.message).to eq(_('You have no permissions'))
- end
- end
end
context 'when a user is not allowed to create an issue' do