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
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-21 21:48:18 +0300
committerDouwe Maan <douwe@gitlab.com>2015-08-21 21:48:18 +0300
commit1cfc4af31e01c59066e5194a080f49ac6cacc0a3 (patch)
treee69d5c401d630fbbcd8d86a3c0e43f7a61da8da9 /spec
parentd0d435a22eea7e40d09c10b0e53032b299d6edfe (diff)
parent747fe7520b244a324b60049cbe22c22a5df29c82 (diff)
Merge branch 'rs-dev-issue-2550' into 'master'
Remove trailing HTML entities from non-Rinku autolinks as well. Addresses internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2550 See merge request !1179
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/markdown/autolink_filter_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/markdown/autolink_filter_spec.rb b/spec/lib/gitlab/markdown/autolink_filter_spec.rb
index 982be0782c9..26332ba5217 100644
--- a/spec/lib/gitlab/markdown/autolink_filter_spec.rb
+++ b/spec/lib/gitlab/markdown/autolink_filter_spec.rb
@@ -86,6 +86,16 @@ module Gitlab::Markdown
doc = filter("See #{link}, ok?")
expect(doc.at_css('a').text).to eq link
+
+ doc = filter("See #{link}...")
+ expect(doc.at_css('a').text).to eq link
+ end
+
+ it 'does not include trailing HTML entities' do
+ doc = filter("See &lt;&lt;&lt;#{link}&gt;&gt;&gt;")
+
+ expect(doc.at_css('a')['href']).to eq link
+ expect(doc.text).to eq "See <<<#{link}>>>"
end
it 'accepts link_attr options' do