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
c915c7b0
Commit
c915c7b0
authored
May 04, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add TaskList to Markdown feature spec
parent
421f3f15
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
spec/features/markdown_spec.rb
spec/features/markdown_spec.rb
+12
-3
spec/fixtures/markdown.md.erb
spec/fixtures/markdown.md.erb
+10
-0
No files found.
spec/features/markdown_spec.rb
View file @
c915c7b0
...
...
@@ -24,6 +24,7 @@ require 'erb'
# -> Rinku (http, https, ftp)
# -> Other schemes
# -> References
# -> TaskList
# -> `html_safe`
# -> Template
#
...
...
@@ -266,6 +267,15 @@ describe 'GitLab Markdown' do
expect
(
body
).
to
have_selector
(
'a.gfm.gfm-label'
,
count:
3
)
end
end
describe
'Task Lists'
do
it
'generates task lists'
do
body
=
get_section
(
'task-lists'
)
expect
(
body
).
to
have_selector
(
'ul.task-list'
,
count:
2
)
expect
(
body
).
to
have_selector
(
'li.task-list-item'
,
count:
7
)
expect
(
body
).
to
have_selector
(
'input[checked]'
,
count:
3
)
end
end
end
end
...
...
@@ -276,9 +286,8 @@ end
# once. Unfortunately RSpec will not let you access `let`s in a `before(:all)`
# block, so we fake it by encapsulating all the shared setup in this class.
#
# The class contains the raw Markup used in the test, dynamically substituting
# real objects, created from factories and setup on-demand, when referenced in
# the Markdown.
# The class renders `spec/fixtures/markdown.md.erb` using ERB, allowing for
# reference to the factory-created objects.
class
MarkdownFeature
include
FactoryGirl
::
Syntax
::
Methods
...
...
spec/fixtures/markdown.md.erb
View file @
c915c7b0
...
...
@@ -176,3 +176,13 @@ References should be parseable even inside _!<%= merge_request.iid %>_ emphasis.
- Label by name in quotes: ~"
<%=
label
.
name
%>
"
- Ignored in code: `~
<%=
simple_label
.
name
%>
`
- Ignored in links: [Link to ~
<%=
simple_label
.
id
%>
](#label-link)
### Task Lists
- [ ] Incomplete task 1
- [x] Complete task 1
- [ ] Incomplete task 2
- [ ] Incomplete sub-task 1
- [ ] Incomplete sub-task 2
- [x] Complete sub-task 1
- [X] Complete task 2
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