BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
markdown_spec.rb
spec/features/markdown_spec.rb
+12
-3
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'
...
@@ -24,6 +24,7 @@ require 'erb'
# -> Rinku (http, https, ftp)
# -> Rinku (http, https, ftp)
# -> Other schemes
# -> Other schemes
# -> References
# -> References
# -> TaskList
# -> `html_safe`
# -> `html_safe`
# -> Template
# -> Template
#
#
...
@@ -266,6 +267,15 @@ describe 'GitLab Markdown' do
...
@@ -266,6 +267,15 @@ describe 'GitLab Markdown' do
expect
(
body
).
to
have_selector
(
'a.gfm.gfm-label'
,
count:
3
)
expect
(
body
).
to
have_selector
(
'a.gfm.gfm-label'
,
count:
3
)
end
end
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
end
end
...
@@ -276,9 +286,8 @@ end
...
@@ -276,9 +286,8 @@ end
# once. Unfortunately RSpec will not let you access `let`s in a `before(:all)`
# 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.
# 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
# The class renders `spec/fixtures/markdown.md.erb` using ERB, allowing for
# real objects, created from factories and setup on-demand, when referenced in
# reference to the factory-created objects.
# the Markdown.
class
MarkdownFeature
class
MarkdownFeature
include
FactoryGirl
::
Syntax
::
Methods
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.
...
@@ -176,3 +176,13 @@ References should be parseable even inside _!<%= merge_request.iid %>_ emphasis.
- Label by name in quotes: ~"
<%=
label
.
name
%>
"
- Label by name in quotes: ~"
<%=
label
.
name
%>
"
- Ignored in code: `~
<%=
simple_label
.
name
%>
`
- Ignored in code: `~
<%=
simple_label
.
name
%>
`
- Ignored in links: [Link to ~
<%=
simple_label
.
id
%>
](#label-link)
- 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