Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class ApplicationController < ActionController::Base

rescue_from StandardError, with: :handle_server_error

rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized

private

def current_org
Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/super_admin/orgs_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
sign_in(create(:user))
post :merge_analyze, params: @params
expect(response.code).to eql("302")
expect(response).to redirect_to(root_path)
expect(response).to redirect_to(plans_path)
expect(flash[:alert].present?).to eql(true)
end
it "succeeds in analyzing the Orgs" do
Expand All @@ -64,7 +64,7 @@
sign_in(create(:user))
post :merge_commit, params: @params
expect(response.code).to eql("302")
expect(response).to redirect_to(root_path)
expect(response).to redirect_to(plans_path)
expect(flash[:alert].present?).to eql(true)
end
it "fails if :target_org is not found" do
Expand Down