adjust webhooks controller

This commit is contained in:
Pete Matsyburka committed 2024-11-09 11:15:19 +02:00
1 parent fd3530ac62
commit ca7ab5aab7
4 files changed
+15 -39

No files matched your search

+1 -13
View File
@@ -86,7 +86,7 @@ RSpec.describe 'Webhook Settings' do
expect(webhook_url.url).to eq('https://example.org/webhook')
expect(page).to have_content('Webhook URL has been updated.')
expect(page.current_path).to eq(settings_webhook_path(webhook_url))
expect(page.current_path).to eq(settings_webhooks_path)
end
it 'deletes the webhook' do
@@ -185,17 +185,5 @@ RSpec.describe 'Webhook Settings' do
expect(args['submitter_id']).to eq(submitter.id)
expect(page).to have_content('Webhook request has been sent.')
end
it "doesn't resend the webhook request when the webhook is doesn't exist" do
visit settings_webhooks_path
webhook_url.destroy
expect do
click_button 'Test Webhook'
end.not_to change(SendFormCompletedWebhookRequestJob.jobs, :size)
expect(page).to have_content('Unable to resend webhook request.')
end
end
end