diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-09 15:07:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-09 15:07:58 +0300 |
commit | 93c6764dacd4c605027ef1cd367d3aebe420b223 (patch) | |
tree | 5213b1fc874ee3e31701a81007f97d7664b95205 /spec/lib/gitlab/diff | |
parent | aa10b541b6a3fbc7fa712abcc59d073fc8dc620a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/diff')
-rw-r--r-- | spec/lib/gitlab/diff/highlight_cache_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/diff/highlight_cache_spec.rb b/spec/lib/gitlab/diff/highlight_cache_spec.rb index 97ebe6ae0e4..163a140b6c2 100644 --- a/spec/lib/gitlab/diff/highlight_cache_spec.rb +++ b/spec/lib/gitlab/diff/highlight_cache_spec.rb @@ -98,6 +98,16 @@ describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do expect { cache.send(:write_to_redis_hash, diff_hash) } .to change { Gitlab::Redis::Cache.with { |r| r.hgetall(cache_key) } } end + + # Note that this spec and the code it confirms can be removed when + # :hset_redis_diff_caching is fully launched. + # + it 'attempts to clear deprecated cache entries' do + expect_any_instance_of(Gitlab::Diff::DeprecatedHighlightCache) + .to receive(:clear).and_call_original + + cache.send(:write_to_redis_hash, diff_hash) + end end describe '#clear' do |