Commit 82e3c537 authored by Kerri Miller's avatar Kerri Miller

Clarify spec by adding better test for expectations

parent f226967c
......@@ -75,8 +75,10 @@ describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do
describe '#write_if_empty' do
let(:backend) { double('backend', read: {}).as_null_object }
xit 'submits a single write action to the redis cache when invoked multiple times' do
expect(cache).to receive(:write_to_redis_hash).once
it 'filters the key/value list of entries to be caches for each invocation' do
expect(cache).to receive(:write_to_redis_hash)
.once.with(hash_including(".gitignore")).and_call_original
expect(cache).to receive(:write_to_redis_hash).once.with({}).and_call_original
2.times { cache.write_if_empty }
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment