Misc coverage improvements for Admin::
and Settings::
controllers (#25346)
This commit is contained in:
parent
e0ed0f8c7c
commit
708299bb0d
13 changed files with 187 additions and 0 deletions
|
@ -86,6 +86,24 @@ describe Admin::WebhooksController do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'POST #enable' do
|
||||
it 'enables the webhook' do
|
||||
post :enable, params: { id: webhook.id }
|
||||
|
||||
expect(webhook.reload).to be_enabled
|
||||
expect(response).to redirect_to(admin_webhook_path(webhook))
|
||||
end
|
||||
end
|
||||
|
||||
describe 'POST #disable' do
|
||||
it 'disables the webhook' do
|
||||
post :disable, params: { id: webhook.id }
|
||||
|
||||
expect(webhook.reload).to_not be_enabled
|
||||
expect(response).to redirect_to(admin_webhook_path(webhook))
|
||||
end
|
||||
end
|
||||
|
||||
describe 'DELETE #destroy' do
|
||||
it 'destroys the record' do
|
||||
expect do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue