diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-06-09 20:12:51 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-06-10 00:18:36 +0300 |
commit | 34ba80392dd23614f60a759ec41b4df1f2915f49 (patch) | |
tree | 1ee3af3c41888aee4b196f6cf91f917e11176a21 /spec/serializers/pipeline_serializer_spec.rb | |
parent | ce37a209c6394115eb77c01b877dfd3ae1a6e7e1 (diff) |
Use :request_store hooks on specs
Diffstat (limited to 'spec/serializers/pipeline_serializer_spec.rb')
-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 |