Make sure fixture creation does not affect query count test
This commit is contained in:
parent
3e08713c79
commit
b3cf3d046b
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue