Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-16 18:09:27 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-16 18:09:27 +0300
commit8d4aaa4dd07cd02383f7d09d74eb66ffe47a41c4 (patch)
tree684210b8b7c8b5664e8d7b529e59ffde6bcfaed4 /spec/lib/gitlab
parentcbfe03ae04a52d9825ff7cbeccdfe5d313adf6a2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/diff/highlight_cache_spec.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/spec/lib/gitlab/diff/highlight_cache_spec.rb b/spec/lib/gitlab/diff/highlight_cache_spec.rb
index eb8072a554e..457e81bc95f 100644
--- a/spec/lib/gitlab/diff/highlight_cache_spec.rb
+++ b/spec/lib/gitlab/diff/highlight_cache_spec.rb
@@ -53,26 +53,22 @@ describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do
fallback_diff_refs: diffs.fallback_diff_refs)
end
- it 'does not calculate highlighting when reading from cache' do
+ before do
cache.write_if_empty
cache.decorate(diff_file)
+ end
+ it 'does not calculate highlighting when reading from cache' do
expect_any_instance_of(Gitlab::Diff::Highlight).not_to receive(:highlight)
diff_file.highlighted_diff_lines
end
it 'assigns highlighted diff lines to the DiffFile' do
- cache.write_if_empty
- cache.decorate(diff_file)
-
expect(diff_file.highlighted_diff_lines.size).to be > 5
end
it 'assigns highlighted diff lines which rich_text are HTML-safe' do
- cache.write_if_empty
- cache.decorate(diff_file)
-
rich_texts = diff_file.highlighted_diff_lines.map(&:rich_text)
expect(rich_texts).to all(be_html_safe)