Commit 867ec62f authored by Kerri Miller's avatar Kerri Miller

Collect file_path from diff_files

This worked in naive unit testing, but when we begin to interact
directly with redis, it surfaced that we need to assemble file_path
information from the diff_files rather than the diffs.
parent ef898545
......@@ -111,6 +111,15 @@ describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do
end
end
describe `#file_paths` do
it 'accesses path info via #diff_files' do
expect_any_instance_of(Gitlab::Diff::FileCollection::MergeRequestDiff)
.to receive(:diff_files).at_least(:once).and_call_original
cache.send(:file_paths)
end
end
describe '#write_to_redis_hash' do
it 'creates or updates a Redis hash' do
expect { cache.send(:write_to_redis_hash, diff_hash) }
......
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