Skip to content

Commit

Permalink
Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
nateberkopec committed Dec 5, 2023
1 parent fb2c080 commit 0a9ffa1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/mini_profiler.rb
Expand Up @@ -409,7 +409,7 @@ def matches_action?(action, env)

def action_parameters(env)
query_params = Rack::Utils.parse_nested_query(env['QUERY_STRING'])
end
end

def inject_profiler(env, status, headers, body)
# mini profiler is meddling with stuff, we can not cache cause we will get incorrect data
Expand Down
10 changes: 5 additions & 5 deletions spec/integration/mini_profiler_spec.rb
Expand Up @@ -377,13 +377,13 @@ def load_prof(response)
expect(last_response.body).to include('CONTENT_LENGTH')
end

it 'works via HTTP header' do
it 'works via HTTP header' do
Rack::MiniProfiler.config.enable_advanced_debugging_tools = true
get '/html', nil, { 'HTTP_X_RACK_MINI_PROFILER' => 'env' }

expect(last_response.body).to include('QUERY_STRING')
expect(last_response.body).to include('CONTENT_LENGTH')
end
end
end
end

Expand Down Expand Up @@ -422,10 +422,10 @@ def load_prof(response)
expect(last_response.header['Content-Type']).to include('text/plain')
end

it "should return a report when an HTTP header is used" do
it "should return a report when an HTTP header is used" do
get '/html', nil, { 'HTTP_X_RACK_MINI_PROFILER' => 'profile-gc' }
expect(last_response.header['Content-Type']).to include('text/plain')
end
end
end

describe 'error handling when storage_instance fails to save' do
Expand Down Expand Up @@ -667,7 +667,7 @@ def load_prof(response)
expect(last_response.body).to eq("Snapshot with id '"><qss>' not found"), "id should be escaped to prevent XSS"
end
end

describe 'when triggering via HTTP header' do
it 'can trigger the help option via an HTTP header' do
get '/html', nil, { 'HTTP_X_RACK_MINI_PROFILER' => 'help' }
Expand Down

0 comments on commit 0a9ffa1

Please sign in to comment.