~cytrogen/masto-fe

fd23f5024377ee3d31d1a9fd7d2f094036ceb45b — Claire 2 years ago c78280a
Fix wrong view being displayed when a webhook fails validation (#25464)

M app/controllers/admin/webhooks_controller.rb => app/controllers/admin/webhooks_controller.rb +1 -1
@@ 42,7 42,7 @@ module Admin
      if @webhook.update(resource_params)
        redirect_to admin_webhook_path(@webhook)
      else
        render :show
        render :edit
      end
    end


M spec/controllers/admin/webhooks_controller_spec.rb => spec/controllers/admin/webhooks_controller_spec.rb +1 -1
@@ 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