Fix wrong view being displayed when a webhook fails validation (#25464)

pull/62/head
Claire 2023-06-20 18:15:35 +02:00 committed by GitHub
parent c78280a8ce
commit fd23f50243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ module Admin
if @webhook.update(resource_params)
redirect_to admin_webhook_path(@webhook)
else
render :show
render :edit
end
end

View File

@ -82,7 +82,7 @@ describe Admin::WebhooksController do
end.to_not change(webhook, :url)
expect(response).to have_http_status(:success)
expect(response).to render_template(:show)
expect(response).to render_template(:edit)
end
end