Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
27ada5aa
Commit
27ada5aa
authored
Jun 08, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Combine tests for internal links
parent
064cff13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
spec/features/markdown_spec.rb
spec/features/markdown_spec.rb
+4
-4
No files found.
spec/features/markdown_spec.rb
View file @
27ada5aa
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment