diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-06-12 17:58:24 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-06-12 17:58:24 +0300 |
commit | 75a5e6aa32dde7764815d81eca95157804a4e9a0 (patch) | |
tree | 904d5d0fe90ed32b0d6a4a1f0d94dbf0843c5140 /spec/serializers | |
parent | 39f3fe76099601b731145718cf00b196bf66104c (diff) | |
parent | 34ba80392dd23614f60a759ec41b4df1f2915f49 (diff) |
Merge branch 'use-request-store-helper-instead-actual-code' into 'master'
Use :request_store hooks on specs
See merge request !12058
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/pipeline_serializer_spec.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/spec/serializers/pipeline_serializer_spec.rb b/spec/serializers/pipeline_serializer_spec.rb index 088f24eb180..34b19fb9fc4 100644 --- a/spec/serializers/pipeline_serializer_spec.rb +++ b/spec/serializers/pipeline_serializer_spec.rb @@ -102,18 +102,11 @@ describe PipelineSerializer do Ci::Pipeline::AVAILABLE_STATUSES.each do |status| create_pipeline(status) end - - RequestStore.begin! - end - - after do - RequestStore.end! - RequestStore.clear! end - it "verifies number of queries" do + it 'verifies number of queries', :request_store do recorded = ActiveRecord::QueryRecorder.new { subject } - expect(recorded.count).to be_within(1).of(60) + expect(recorded.count).to be_within(1).of(57) expect(recorded.cached_count).to eq(0) end |