Make sure fixture creation does not affect query count test

This commit is contained in:
Oswaldo Ferreira 2017-05-19 10:19:04 -03:00
parent 3e08713c79
commit b3cf3d046b

View file

@ -122,9 +122,12 @@ describe Projects::MergeRequestsController do
context 'number of queries' do context 'number of queries' do
it 'verifies number of queries' do it 'verifies number of queries' do
# pre-create objects
merge_request
recorded = ActiveRecord::QueryRecorder.new { go(format: :json) } 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) expect(recorded.cached_count).to eq(0)
end end
end end