diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-08 00:09:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-08 00:09:00 +0300 |
commit | 9a4d2a38dc79330beb9f8ffb44d88a1b8f699d75 (patch) | |
tree | 482027505bc0ba0a857f1aaa6a9653e4f9ddd5b1 /spec/support_specs | |
parent | 5cda8c8a420399ca9687c4a981fefd50ce5a1fdd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support_specs')
-rw-r--r-- | spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb b/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb index 67d87fe3c2f..a6f5b3862a2 100644 --- a/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb +++ b/spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb @@ -56,6 +56,7 @@ RSpec.describe ExceedQueryLimitHelpers do TestQueries.where(version: 'x').update_all(version: 'y') TestQueries.where(version: 'foobar').count TestQueries.where(version: 'z').delete_all + Project.where(id: 1).pluck(:title) end end @@ -71,10 +72,11 @@ RSpec.describe ExceedQueryLimitHelpers do TestQueries.count TestQueries.where(version: 'y').update_all(version: 'z') TestQueries.where(version: 'z').delete_all + Project.where(id: 2).pluck(:title) end end - it 'merges two query counts' do + it 'merges two query counts, showing only diffs' do test_matcher = TestMatcher.new diff = test_matcher.diff_query_counts( @@ -131,6 +133,10 @@ RSpec.describe ExceedQueryLimitHelpers do }, "RELEASE SAVEPOINT active_record_1" => { "" => [0, 1] + }, + "SELECT \"projects\".\"name\" FROM \"projects\"" => { + "WHERE \"projects\".\"id\" = 1" => [1, 0], + "WHERE \"projects\".\"id\" = 2" => [0, 1] } }) end |