summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBrett Walker <brett@digitalmoksha.com>2017-12-11 16:45:06 +0000
committerNick Thomas <nick@gitlab.com>2017-12-11 16:45:06 +0000
commitbcbe5672ecaa3174cd0c2624a8cf6d0568e83654 (patch)
tree5a6ffa8da66ea207a85a6bf3c6f560a745f7ffbf /spec
parentd9f40fddb704a60a38a95dd6433ff40ce65d738d (diff)
downloadgitlab-ce-bcbe5672ecaa3174cd0c2624a8cf6d0568e83654.tar.gz
small change to make less conflict with EE version
Diffstat (limited to 'spec')
-rw-r--r--spec/services/users/keys_count_service_spec.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/services/users/keys_count_service_spec.rb b/spec/services/users/keys_count_service_spec.rb
index a188cf86772..bee8380e8b7 100644
--- a/spec/services/users/keys_count_service_spec.rb
+++ b/spec/services/users/keys_count_service_spec.rb
@@ -15,14 +15,12 @@ describe Users::KeysCountService, :use_clean_rails_memory_store_caching do
expect(service.count).to eq(1)
end
- it 'caches the number of keys in Redis' do
+ it 'caches the number of keys in Redis', :request_store do
+ service.delete_cache
+ control_count = ActiveRecord::QueryRecorder.new { service.count }.count
service.delete_cache
- recorder = ActiveRecord::QueryRecorder.new do
- 2.times { service.count }
- end
-
- expect(recorder.count).to eq(1)
+ expect { 2.times { service.count } }.not_to exceed_query_limit(control_count)
end
end