Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-07-06 18:11:20 +0300
committerRémy Coutable <remy@rymai.me>2017-07-06 18:11:20 +0300
commitde9eca0af65e8fd235aed8c9ea598f16562956e7 (patch)
tree4b045079c29acc0d0238d7eeb2337db5e90bf707 /spec/lib/gitlab/performance_bar_spec.rb
parente5a7d1da8cfda5dc3755b6a0a1ed450415f39873 (diff)
Use Rails.cache instead of Redis directly
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/lib/gitlab/performance_bar_spec.rb')
-rw-r--r--spec/lib/gitlab/performance_bar_spec.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/spec/lib/gitlab/performance_bar_spec.rb b/spec/lib/gitlab/performance_bar_spec.rb
index ecdecc03304..6414bdb80ed 100644
--- a/spec/lib/gitlab/performance_bar_spec.rb
+++ b/spec/lib/gitlab/performance_bar_spec.rb
@@ -31,19 +31,11 @@ describe Gitlab::PerformanceBar do
described_class.allowed_user?(user)
end
- it 'caches the allowed user IDs in Redis', :redis do
+ it 'caches the allowed user IDs in cache', :caching do
expect do
expect(described_class.allowed_user?(user)).to be_truthy
end.not_to exceed_query_limit(0)
end
-
- it 'caches the allowed user IDs for 10 minutes', :redis do
- ttl_cached_user_ids = Gitlab::Redis.with do |redis|
- redis.ttl(described_class.cache_key)
- end
-
- expect(ttl_cached_user_ids).to be <= 10.minutes
- end
end
describe '.allowed_user?' do