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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
349eaaa9
Commit
349eaaa9
authored
Aug 06, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gfm specs
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
e1f141ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
spec/helpers/gitlab_markdown_helper_spec.rb
spec/helpers/gitlab_markdown_helper_spec.rb
+5
-4
No files found.
spec/helpers/gitlab_markdown_helper_spec.rb
View file @
349eaaa9
...
...
@@ -17,6 +17,7 @@ describe GitlabMarkdownHelper do
before
do
# Helper expects a @project instance variable
@project
=
project
@ref
=
'markdown'
@repository
=
project
.
repository
end
...
...
@@ -472,13 +473,13 @@ describe GitlabMarkdownHelper do
it
"should handle relative urls for a file in master"
do
actual
=
"[GitLab API doc](doc/api/README.md)
\n
"
expected
=
"<p><a href=
\"
/
#{
project
.
path_with_namespace
}
/blob/
master
/doc/api/README.md
\"
>GitLab API doc</a></p>
\n
"
expected
=
"<p><a href=
\"
/
#{
project
.
path_with_namespace
}
/blob/
#{
@ref
}
/doc/api/README.md
\"
>GitLab API doc</a></p>
\n
"
markdown
(
actual
).
should
match
(
expected
)
end
it
"should handle relative urls for a directory in master"
do
actual
=
"[GitLab API doc](doc/api)
\n
"
expected
=
"<p><a href=
\"
/
#{
project
.
path_with_namespace
}
/tree/
master
/doc/api
\"
>GitLab API doc</a></p>
\n
"
expected
=
"<p><a href=
\"
/
#{
project
.
path_with_namespace
}
/tree/
#{
@ref
}
/doc/api
\"
>GitLab API doc</a></p>
\n
"
markdown
(
actual
).
should
match
(
expected
)
end
...
...
@@ -490,13 +491,13 @@ describe GitlabMarkdownHelper do
it
"should handle relative urls in reference links for a file in master"
do
actual
=
"[GitLab API doc][GitLab readme]
\n
[GitLab readme]: doc/api/README.md
\n
"
expected
=
"<p><a href=
\"
/
#{
project
.
path_with_namespace
}
/blob/
master
/doc/api/README.md
\"
>GitLab API doc</a></p>
\n
"
expected
=
"<p><a href=
\"
/
#{
project
.
path_with_namespace
}
/blob/
#{
@ref
}
/doc/api/README.md
\"
>GitLab API doc</a></p>
\n
"
markdown
(
actual
).
should
match
(
expected
)
end
it
"should handle relative urls in reference links for a directory in master"
do
actual
=
"[GitLab API doc directory][GitLab readmes]
\n
[GitLab readmes]: doc/api/
\n
"
expected
=
"<p><a href=
\"
/
#{
project
.
path_with_namespace
}
/tree/
master
/doc/api
\"
>GitLab API doc directory</a></p>
\n
"
expected
=
"<p><a href=
\"
/
#{
project
.
path_with_namespace
}
/tree/
#{
@ref
}
/doc/api
\"
>GitLab API doc directory</a></p>
\n
"
markdown
(
actual
).
should
match
(
expected
)
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