diff options
Diffstat (limited to 'spec/support/shared_examples/services/alert_management/alert_processing')
3 files changed, 5 insertions, 5 deletions
diff --git a/spec/support/shared_examples/services/alert_management/alert_processing/alert_firing_shared_examples.rb b/spec/support/shared_examples/services/alert_management/alert_processing/alert_firing_shared_examples.rb index 0db9519f760..6a9da91eaa7 100644 --- a/spec/support/shared_examples/services/alert_management/alert_processing/alert_firing_shared_examples.rb +++ b/spec/support/shared_examples/services/alert_management/alert_processing/alert_firing_shared_examples.rb @@ -11,7 +11,7 @@ RSpec.shared_examples 'creates an alert management alert or errors' do it 'creates AlertManagement::Alert' do expect(Gitlab::AppLogger).not_to receive(:warn) - expect { subject }.to change(AlertManagement::Alert, :count).by(1) + expect { subject }.to change { AlertManagement::Alert.count }.by(1) end it 'executes the alert service hooks' do @@ -118,7 +118,7 @@ end RSpec.shared_examples 'does not create an alert management alert' do specify do - expect { subject }.not_to change(AlertManagement::Alert, :count) + expect { subject }.not_to change { AlertManagement::Alert.count } end end diff --git a/spec/support/shared_examples/services/alert_management/alert_processing/incident_resolution_shared_examples.rb b/spec/support/shared_examples/services/alert_management/alert_processing/incident_resolution_shared_examples.rb index 1973577d742..2740b6bf59d 100644 --- a/spec/support/shared_examples/services/alert_management/alert_processing/incident_resolution_shared_examples.rb +++ b/spec/support/shared_examples/services/alert_management/alert_processing/incident_resolution_shared_examples.rb @@ -14,7 +14,7 @@ RSpec.shared_examples 'closes related incident if enabled' do specify do expect { Sidekiq::Testing.inline! { subject } } .to change { alert.issue.reload.closed? }.from(false).to(true) - .and change(ResourceStateEvent, :count).by(1) + .and change { ResourceStateEvent.count }.by(1) end end diff --git a/spec/support/shared_examples/services/alert_management/alert_processing/system_notes_shared_examples.rb b/spec/support/shared_examples/services/alert_management/alert_processing/system_notes_shared_examples.rb index 57d598c0259..2d0815ba27c 100644 --- a/spec/support/shared_examples/services/alert_management/alert_processing/system_notes_shared_examples.rb +++ b/spec/support/shared_examples/services/alert_management/alert_processing/system_notes_shared_examples.rb @@ -19,7 +19,7 @@ RSpec.shared_examples 'creates expected system notes for alert' do |*notes| end it "for #{notes.join(', ')}" do - expect { subject }.to change(Note, :count).by(expected_note_count) + expect { subject }.to change { Note.count }.by(expected_note_count) expected_notes.each_value.with_index do |value, index| expect(new_notes[index]).to include(value) @@ -29,6 +29,6 @@ end RSpec.shared_examples 'does not create a system note for alert' do specify do - expect { subject }.not_to change(Note, :count) + expect { subject }.not_to change { Note.count } end end |