Fix wrong view being displayed when a webhook fails validation (#25464)
This commit is contained in:
parent
4e861795a4
commit
923dde8e6c
2 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ module Admin
|
||||||
if @webhook.update(resource_params)
|
if @webhook.update(resource_params)
|
||||||
redirect_to admin_webhook_path(@webhook)
|
redirect_to admin_webhook_path(@webhook)
|
||||||
else
|
else
|
||||||
render :show
|
render :edit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ describe Admin::WebhooksController do
|
||||||
end.to_not change(webhook, :url)
|
end.to_not change(webhook, :url)
|
||||||
|
|
||||||
expect(response).to have_http_status(:success)
|
expect(response).to have_http_status(:success)
|
||||||
expect(response).to render_template(:show)
|
expect(response).to render_template(:edit)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue