diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-29 06:07:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-29 06:07:51 +0300 |
commit | d94ed2a46aad78435de66af05c84060ae78c8fc0 (patch) | |
tree | 19b057ae567e8bdd10289d290608362f466ca589 /spec/support_specs/helpers/active_record/query_recorder_spec.rb | |
parent | e56fd471503e00167ca96e7792f75a0d1f3b7891 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support_specs/helpers/active_record/query_recorder_spec.rb')
-rw-r--r-- | spec/support_specs/helpers/active_record/query_recorder_spec.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/spec/support_specs/helpers/active_record/query_recorder_spec.rb b/spec/support_specs/helpers/active_record/query_recorder_spec.rb index 48069c6a766..0827ce37b07 100644 --- a/spec/support_specs/helpers/active_record/query_recorder_spec.rb +++ b/spec/support_specs/helpers/active_record/query_recorder_spec.rb @@ -14,9 +14,6 @@ describe ActiveRecord::QueryRecorder do TestQueries.first end - # Test first_only flag works as expected - expect(control.find_query(/.*query_recorder_spec.rb.*/, 0, first_only: true)) - .to eq(control.find_query(/.*query_recorder_spec.rb.*/, 0).first) # Check #find_query expect(control.find_query(/.*/, 0).size) .to eq(control.data.keys.size) @@ -32,9 +29,7 @@ describe ActiveRecord::QueryRecorder do # Ensure memoization value match the raw value above expect(control.count).to eq(control.log.size) # Ensure we have only two sources of queries - expect(control.data.keys.size).to eq(2) - # Ensure we detect only queries from this file - expect(control.data.keys.find_all { |i| i.match(/query_recorder_spec.rb/) }.count).to eq(2) + expect(control.data.keys.size).to eq(1) end end end |