0
0
Fork 0

Convert admin/webhooks/secrets spec controller->system (#34109)

This commit is contained in:
Matt Jankowski 2025-03-10 04:17:48 -04:00 committed by GitHub
parent 7169b270ae
commit e1f278cdf2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 23 deletions

View file

@ -85,6 +85,19 @@ RSpec.describe 'Admin Webhooks' do
end
end
describe 'Rotate a webhook secret' do
let!(:webhook) { Fabricate :webhook, events: [Webhook::EVENTS.first] }
it 'rotates secret and returns to page' do
visit admin_webhook_path(webhook)
expect { click_on I18n.t('admin.webhooks.rotate_secret') }
.to(change { webhook.reload.secret })
expect(page)
.to have_title(I18n.t('admin.webhooks.title'))
end
end
describe 'Destroy a webhook' do
let!(:webhook) { Fabricate :webhook, events: [Webhook::EVENTS.first] }