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:
authorDouwe Maan <douwe@selenight.nl>2016-07-11 00:13:06 +0300
committerDouwe Maan <douwe@selenight.nl>2017-05-10 16:26:21 +0300
commitb1012d986c4142d7c45d46fa70511ea5faa6150f (patch)
treeb19d94d1ac47b6079bdd3cecb885dff5a3e0fdd2 /spec/lib/gitlab/highlight_spec.rb
parent3f6d91c53c1bf99ce2e7dfeb9c25ef5f8149b72e (diff)
Autolink package names in Gemfile
Diffstat (limited to 'spec/lib/gitlab/highlight_spec.rb')
-rw-r--r--spec/lib/gitlab/highlight_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/highlight_spec.rb b/spec/lib/gitlab/highlight_spec.rb
index e49799ad105..e57b3053871 100644
--- a/spec/lib/gitlab/highlight_spec.rb
+++ b/spec/lib/gitlab/highlight_spec.rb
@@ -57,4 +57,15 @@ describe Gitlab::Highlight, lib: true do
end
end
end
+
+ describe '#highlight' do
+ subject { described_class.highlight(file_name, file_content, nowrap: false) }
+
+ it 'links dependencies via DependencyLinker' do
+ expect(Gitlab::DependencyLinker).to receive(:link).
+ with('file.name', 'Contents', anything).and_call_original
+
+ described_class.highlight('file.name', 'Contents')
+ end
+ end
end