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:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-06-08 20:20:24 +0300
committerAlfredo Sumaran <alfredo@gitlab.com>2016-06-08 21:07:20 +0300
commit27ada5aa4690affd04ada606d15a44a598184c57 (patch)
tree7db34e7e6d851e947734ad947ced4010571635ad /spec
parent064cff13fd7d02672695b4ac1722bbd6df35f1d4 (diff)
Combine tests for internal links
Diffstat (limited to 'spec')
-rw-r--r--spec/features/markdown_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/features/markdown_spec.rb b/spec/features/markdown_spec.rb
index cabccdacf87..1193cae5a2f 100644
--- a/spec/features/markdown_spec.rb
+++ b/spec/features/markdown_spec.rb
@@ -165,26 +165,26 @@ describe 'GitLab Markdown', feature: true do
describe 'ExternalLinkFilter' do
it 'adds nofollow to external link' do
link = doc.at_css('a:contains("Google")')
+
expect(link.attr('rel')).to include('nofollow')
end
it 'adds noreferrer to external link' do
link = doc.at_css('a:contains("Google")')
+
expect(link.attr('rel')).to include('noreferrer')
end
it 'adds _blank to target attribute for external links' do
link = doc.at_css('a:contains("Google")')
+
expect(link.attr('target')).to match('_blank')
end
it 'ignores internal link' do
link = doc.at_css('a:contains("GitLab Root")')
- expect(link.attr('rel')).not_to match 'nofollow'
- end
- it 'does not set _blank to target attribute for internal links' do
- link = doc.at_css('a:contains("GitLab Root")')
+ expect(link.attr('rel')).not_to match 'nofollow'
expect(link.attr('target')).not_to match '_blank'
end
end