diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-07-30 14:29:15 +0300 |
---|---|---|
committer | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-07-30 14:29:15 +0300 |
commit | e4b53c01aca3684820520752308669f7cb730062 (patch) | |
tree | 83fdde010a5d0b0c875d331cb97d6d90a88f87ae /spec/controllers | |
parent | 75460dd595bfa12a1b6ce76e71a7401ddc354f26 (diff) | |
parent | 2ca8219a20f16636b7a0ffa899a1a04ab8e84782 (diff) |
Merge remote-tracking branch 'origin/master' into 41416-making-instance-wide-data-tools-more-accessible
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/pipelines_controller_spec.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb index 290fcd4f8e6..d89716b1b50 100644 --- a/spec/controllers/projects/pipelines_controller_spec.rb +++ b/spec/controllers/projects/pipelines_controller_spec.rb @@ -55,10 +55,8 @@ describe Projects::PipelinesController do stub_feature_flags(ci_pipeline_persisted_stages: false) end - it 'returns JSON with serialized pipelines', :request_store do - queries = ActiveRecord::QueryRecorder.new do - get_pipelines_index_json - end + it 'returns JSON with serialized pipelines' do + get_pipelines_index_json expect(response).to have_gitlab_http_status(:ok) expect(response).to match_response_schema('pipeline') @@ -73,8 +71,14 @@ describe Projects::PipelinesController do json_response.dig('pipelines', 0, 'details', 'stages').tap do |stages| expect(stages.count).to eq 3 end + end + + it 'does not execute N+1 queries' do + queries = ActiveRecord::QueryRecorder.new do + get_pipelines_index_json + end - expect(queries.count).to be_within(5).of(30) + expect(queries.count).to be <= 36 end end |