Add TaskList to Markdown feature spec
This commit is contained in:
parent
421f3f1551
commit
c915c7b001
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue