Skip to content

Commit

Permalink
Fix wrong view being displayed when a webhook fails validation (masto…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Jun 20, 2023
1 parent c78280a commit fd23f50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/admin/webhooks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def update
if @webhook.update(resource_params)
redirect_to admin_webhook_path(@webhook)
else
render :show
render :edit
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/admin/webhooks_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
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

Expand Down

0 comments on commit fd23f50

Please sign in to comment.