diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-18 14:11:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-18 14:11:44 +0300 |
commit | 25989ab7ef1a444ed2abd5479f176d58e1d9462a (patch) | |
tree | 271bb24f3c7178f320cb9de0be0833a285327d09 /spec/lib/gitlab/discussions_diff | |
parent | 9bbb32b29703f3ce33dd35d5101145774b793a6d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/discussions_diff')
-rw-r--r-- | spec/lib/gitlab/discussions_diff/file_collection_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/discussions_diff/file_collection_spec.rb b/spec/lib/gitlab/discussions_diff/file_collection_spec.rb index 6ef1e41450f..a13727b62ea 100644 --- a/spec/lib/gitlab/discussions_diff/file_collection_spec.rb +++ b/spec/lib/gitlab/discussions_diff/file_collection_spec.rb @@ -40,6 +40,14 @@ describe Gitlab::DiscussionsDiff::FileCollection do subject.load_highlight end + it 'does not write cache for empty mapping' do + allow(subject).to receive(:highlighted_lines_by_ids).and_return([]) + + expect(Gitlab::DiscussionsDiff::HighlightCache).not_to receive(:write_multiple) + + subject.load_highlight + end + it 'does not write cache for resolved notes' do diff_note_a.update_column(:resolved_at, Time.now) |