Skip to content
代码片段 群组 项目
提交 19075e7d 编辑于 作者: Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
浏览文件

Merge branch 'sy-modify-alert-update-specs' into 'master'

Stop using escalation shared examples for alert updates

See merge request gitlab-org/gitlab!95839
No related branches found
No related tags found
无相关合并请求
......@@ -32,7 +32,13 @@
let(:new_status) { :triggered }
it_behaves_like 'creates an escalation'
it 'creates an escalation' do
expect(IncidentManagement::PendingEscalations::AlertCreateWorker)
.to receive(:perform_async)
.with(a_kind_of(Integer))
subject
end
end
context 'moving from an open status to closed status' do
......@@ -42,14 +48,16 @@
let(:new_status) { :resolved }
let(:target) { alert }
include_examples "deletes the target's escalations"
it "deletes the target's escalations" do
expect { execute }.to change(IncidentManagement::PendingEscalations::Alert, :count).by(-1)
end
end
context 'moving from a status of the same group' do
let(:new_status) { :ignored }
it 'does not create or delete escalations' do
expect { execute }.to change { IncidentManagement::PendingEscalations::Alert.count }.by(0)
expect { execute }.not_to change(IncidentManagement::PendingEscalations::Alert, :count)
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册