Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-24 23:57:35 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-24 23:57:35 +0300
commitb8ad3647ad99a64ffc6296883aa8135d462dd17b (patch)
tree52b01f122b014724783ce7f31761296e9d0f76c2 /spec
parentc3c9703437a552700c2a6ca010b05cc56aa6d73a (diff)
parentb7ed7d05a0b2aab9123c101a1a0558ae0f9bf7cc (diff)
Merge branch 'fix-nested-tasks' into 'master'
Fix nested task lists When nesting task list items, the parent item is wrapped in a `<p>` tag. Update the task list parser to handle these paragraph wrappers. cc @sytse See merge request !413
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/gitlab_markdown_helper_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb
index 6ba27b536e4..ddbb4467f10 100644
--- a/spec/helpers/gitlab_markdown_helper_spec.rb
+++ b/spec/helpers/gitlab_markdown_helper_spec.rb
@@ -817,6 +817,17 @@ EOT
)
end
+ it 'should render checkboxes for nested tasks' do
+ rendered_text = markdown(@source_text_asterisk, parse_tasks: true)
+
+ expect(rendered_text).to match(
+ /<input.*checkbox.*valid unchecked nested task/
+ )
+ expect(rendered_text).to match(
+ /<input.*checkbox.*valid checked nested task/
+ )
+ end
+
it 'should not be confused by whitespace before bullets' do
rendered_text_asterisk = markdown(@source_text_asterisk,
parse_tasks: true)