adjust webhooks controller

This commit is contained in:
Pete Matsyburka
2024-11-09 01:32:56 +02:00
parent fd3530ac62
commit ca7ab5aab7
4 changed files with 15 additions and 39 deletions
+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