Follow up 02417225f7d3060cddda062cc1bd51b32e75deaf- Fixes #3372 - Applied missing Trigger condition changes to Tests introduced by fixing #3416.
This commit is contained in:
parent
02417225f7
commit
9e8f85477d
1 changed files with 7 additions and 19 deletions
|
@ -4,6 +4,13 @@ RSpec.describe TriggerWebhookJob, type: :job do
|
|||
|
||||
let(:endpoint) { 'http://api.example.com/webhook' }
|
||||
let(:token) { 's3cr3t-t0k3n' }
|
||||
let(:webhook) { create(:webhook, endpoint: endpoint, signature_token: token) }
|
||||
let(:trigger) do
|
||||
create(:trigger,
|
||||
perform: {
|
||||
'notification.webhook' => { 'webhook_id' => webhook.id }
|
||||
})
|
||||
end
|
||||
|
||||
context 'when serialized model argument gets deleted' do
|
||||
|
||||
|
@ -12,16 +19,6 @@ RSpec.describe TriggerWebhookJob, type: :job do
|
|||
let(:ticket) { create(:ticket) }
|
||||
let(:article) { create(:'ticket/article') }
|
||||
|
||||
let(:trigger) do
|
||||
create(:trigger,
|
||||
perform: {
|
||||
'notification.webhook' => {
|
||||
endpoint: endpoint,
|
||||
token: token
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
shared_examples 'handle deleted argument models' do
|
||||
it 'raises no error' do
|
||||
expect { ActiveJob::Base.execute job.serialize }.not_to raise_error
|
||||
|
@ -62,15 +59,6 @@ RSpec.describe TriggerWebhookJob, type: :job do
|
|||
let!(:ticket) { create(:ticket) }
|
||||
let!(:article) { create(:'ticket/article') }
|
||||
|
||||
let(:webhook) { create(:webhook, endpoint: endpoint, signature_token: token) }
|
||||
|
||||
let(:trigger) do
|
||||
create(:trigger,
|
||||
perform: {
|
||||
'notification.webhook' => { 'webhook_id' => webhook.id }
|
||||
})
|
||||
end
|
||||
|
||||
let(:response_status) { 200 }
|
||||
let(:payload) do
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue