summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2017-05-19 10:19:04 -0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2017-05-19 10:19:04 -0300
commitb3cf3d046b8a319c0dbca7cb9aeaea027c080e6f (patch)
tree76666aeb96c8f7a021c803d92208abe3259f7629
parent3e08713c7975dc738b32e8b0e17651fbe3802ec2 (diff)
downloadgitlab-ce-b3cf3d046b8a319c0dbca7cb9aeaea027c080e6f.tar.gz
Make sure fixture creation does not affect query count test32536-mr-widget-performance-improvements
-rw-r--r--spec/controllers/projects/merge_requests_controller_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb
index 7fe2f190790..f0dc6df15ee 100644
--- a/spec/controllers/projects/merge_requests_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests_controller_spec.rb
@@ -122,9 +122,12 @@ describe Projects::MergeRequestsController do
context 'number of queries' do
it 'verifies number of queries' do
+ # pre-create objects
+ merge_request
+
recorded = ActiveRecord::QueryRecorder.new { go(format: :json) }
- expect(recorded.count).to be_within(1).of(94)
+ expect(recorded.count).to be_within(1).of(51)
expect(recorded.cached_count).to eq(0)
end
end