summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/markdown_cache/redis/store_spec.rb
diff options
context:
space:
mode:
authorPatrick Bajao <ebajao@gitlab.com>2019-06-05 13:50:37 +0800
committerPatrick Bajao <ebajao@gitlab.com>2019-06-05 14:36:54 +0800
commit56d52340da0f8f15179b83f1206544a2590c22ff (patch)
treef4a25dbe5d0c165e1368cc7f20ab955560ee048e /spec/lib/gitlab/markdown_cache/redis/store_spec.rb
parent2eecfd8f9d111c6518930b818a16daea8263b37f (diff)
downloadgitlab-ce-56d52340da0f8f15179b83f1206544a2590c22ff.tar.gz
Use #cache_key of subject for generated redis key
This commit also includes some changes in specs to use `Class.new` approach.
Diffstat (limited to 'spec/lib/gitlab/markdown_cache/redis/store_spec.rb')
-rw-r--r--spec/lib/gitlab/markdown_cache/redis/store_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/gitlab/markdown_cache/redis/store_spec.rb b/spec/lib/gitlab/markdown_cache/redis/store_spec.rb
index 59c038cfb2f..e7701cf1306 100644
--- a/spec/lib/gitlab/markdown_cache/redis/store_spec.rb
+++ b/spec/lib/gitlab/markdown_cache/redis/store_spec.rb
@@ -16,10 +16,14 @@ describe Gitlab::MarkdownCache::Redis::Store, :clean_gitlab_redis_cache do
def id
'test-redisbacked-store'
end
+
+ def cache_key
+ "cache-key"
+ end
end
end
let(:storable) { storable_class.new }
- let(:cache_key) { "markdown_cache:#{storable_class}:#{storable.id}" }
+ let(:cache_key) { "markdown_cache:#{storable.cache_key}" }
subject(:store) { described_class.new(storable) }