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
Tatuya Kamada
gitlab-ce
Commits
470b0c25
Commit
470b0c25
authored
Apr 13, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove more now-invalid specs
parent
4d3a634e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
66 deletions
+0
-66
spec/helpers/gitlab_markdown_helper_spec.rb
spec/helpers/gitlab_markdown_helper_spec.rb
+0
-66
No files found.
spec/helpers/gitlab_markdown_helper_spec.rb
View file @
470b0c25
...
...
@@ -36,30 +36,6 @@ describe GitlabMarkdownHelper do
end
describe
"#gfm"
do
it
"should return unaltered text if project is nil"
do
skip
"rspeicher - This isn't actually checked in this method anymore."
actual
=
"Testing references: #
#{
issue
.
iid
}
"
expect
(
gfm
(
actual
)).
not_to
eq
(
actual
)
@project
=
nil
expect
(
gfm
(
actual
)).
to
eq
(
actual
)
end
it
"should not alter non-references"
do
skip
"rspeicher - Invalid test: markdown has already been parsed by the time gfm gets it"
actual
=
expected
=
"_Please_ *stop* 'helping' and all the other b*$#%' you do."
expect
(
gfm
(
actual
)).
to
eq
(
expected
)
end
it
"should not touch HTML entities"
do
skip
"rspeicher - Invalid test: Sanitize (or Nokogiri?) translates the HTML entity back"
allow
(
@project
).
to
receive
(
:issue_exists?
).
with
(
39
).
and_return
([
issue
])
actual
=
'We'll accept good pull requests.'
expect
(
gfm
(
actual
)).
to
eq
(
"We'll accept good pull requests."
)
end
it
"should forward HTML options to links"
do
expect
(
gfm
(
"Fixed in
#{
commit
.
id
}
"
,
@project
,
class:
'foo'
)).
to
have_selector
(
'a.gfm.foo'
)
...
...
@@ -291,12 +267,6 @@ describe GitlabMarkdownHelper do
describe
"#markdown"
do
# TODO (rspeicher) - This block tests multiple different contexts. Break this up!
it
"should handle references in paragraphs"
do
skip
"rspeicher - redundant"
actual
=
"
\n\n
Lorem ipsum dolor sit amet.
#{
commit
.
id
}
Nam pulvinar sapien eget.
\n
"
expected
=
namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
)
expect
(
markdown
(
actual
)).
to
match
(
expected
)
end
# REFERENCES (PART TWO: THE REVENGE) ---------------------------------------
it
"should handle references in headers"
do
...
...
@@ -323,42 +293,6 @@ describe GitlabMarkdownHelper do
)
end
it
"should handle references in lists"
do
skip
"rspeicher - redundant"
project
.
team
<<
[
user
,
:master
]
actual
=
"
\n
* dark: #
#{
issue
.
iid
}
\n
* light by @
#{
member
.
user
.
username
}
"
expect
(
markdown
(
actual
)).
to
match
(
%r{<li>dark: <a.+>#
#{
issue
.
iid
}
</a></li>}
)
expect
(
markdown
(
actual
)).
to
match
(
%r{<li>light by <a.+>@
#{
member
.
user
.
username
}
</a></li>}
)
end
it
"should not link the apostrophe to issue 39"
do
skip
"rspeicher - Redundant"
project
.
team
<<
[
user
,
:master
]
allow
(
project
.
issues
).
to
receive
(
:where
).
with
(
iid:
'39'
).
and_return
([
issue
])
actual
=
"Yes, it is @
#{
member
.
user
.
username
}
's task."
expected
=
/Yes, it is <a.+>@
#{
member
.
user
.
username
}
<\/a>'s task/
expect
(
markdown
(
actual
)).
to
match
(
expected
)
end
it
"should not link the apostrophe to issue 39 in code blocks"
do
skip
"rspeicher - Redundant"
project
.
team
<<
[
user
,
:master
]
allow
(
project
.
issues
).
to
receive
(
:where
).
with
(
iid:
'39'
).
and_return
([
issue
])
actual
=
"Yes, `it is @
#{
member
.
user
.
username
}
's task.`"
expected
=
/Yes, <code>it is @gfm\'s task.<\/code>/
expect
(
markdown
(
actual
)).
to
match
(
expected
)
end
it
"should handle references in <em>"
do
actual
=
"Apply _!
#{
merge_request
.
iid
}
_ ASAP"
...
...
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