summaryrefslogtreecommitdiff
path: root/spec/requests/request_profiler_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/request_profiler_spec.rb')
-rw-r--r--spec/requests/request_profiler_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/requests/request_profiler_spec.rb b/spec/requests/request_profiler_spec.rb
index 75b22b1879b..cf23033b1d3 100644
--- a/spec/requests/request_profiler_spec.rb
+++ b/spec/requests/request_profiler_spec.rb
@@ -1,9 +1,9 @@
-require 'spec_helper'
+require "spec_helper"
-describe 'Request Profiler' do
+describe "Request Profiler" do
let(:user) { create(:user) }
- shared_examples 'profiling a request' do
+ shared_examples "profiling a request" do
before do
allow(Rails).to receive(:cache).and_return(ActiveSupport::Cache::MemoryStore.new)
allow(RubyProf::Profile).to receive(:profile) do |&blk|
@@ -12,16 +12,16 @@ describe 'Request Profiler' do
end
end
- it 'creates a profile of the request' do
+ it "creates a profile of the request" do
project = create(:project, namespace: user.namespace)
time = Time.now
path = "/#{project.full_path}"
Timecop.freeze(time) do
- get path, params: {}, headers: { 'X-Profile-Token' => Gitlab::RequestProfiler.profile_token }
+ get path, params: {}, headers: {"X-Profile-Token" => Gitlab::RequestProfiler.profile_token}
end
- profile_path = "#{Gitlab.config.shared.path}/tmp/requests_profiles/#{path.tr('/', '|')}_#{time.to_i}.html"
+ profile_path = "#{Gitlab.config.shared.path}/tmp/requests_profiles/#{path.tr("/", "|")}_#{time.to_i}.html"
expect(File.exist?(profile_path)).to be true
end
@@ -35,10 +35,10 @@ describe 'Request Profiler' do
login_as(user)
end
- include_examples 'profiling a request'
+ include_examples "profiling a request"
end
context "when user is not logged-in" do
- include_examples 'profiling a request'
+ include_examples "profiling a request"
end
end