Added dropdown for dynamically changing the log level (#962)

This commit is contained in:
Ahmad Farhat
2020-02-24 12:51:27 -05:00
committed by GitHub
parent 2cc1fdf281
commit 4093a89b4a
6 changed files with 79 additions and 0 deletions

View File

@ -434,6 +434,18 @@ describe AdminsController, type: :controller do
expect(@user3.social_uid).to be(nil)
end
end
context "POST #log_level" do
it "changes the log level" do
@request.session[:user_id] = @admin.id
@admin.add_role :super_admin
expect(Rails.logger.level).to eq(0)
post :log_level, params: { value: 2 }
expect(Rails.logger.level).to eq(2)
end
end
end
describe "Roles" do