diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-05-19 16:19:04 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-05-19 16:19:04 +0300 |
commit | b3cf3d046b8a319c0dbca7cb9aeaea027c080e6f (patch) | |
tree | 76666aeb96c8f7a021c803d92208abe3259f7629 /spec | |
parent | 3e08713c7975dc738b32e8b0e17651fbe3802ec2 (diff) |
Make sure fixture creation does not affect query count test
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/projects/merge_requests_controller_spec.rb | 5 |
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 |