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
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-08 12:39:48 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-08 12:39:48 +0300
commit6c32abc5f7f090d4932054e5cc1ff0594edd5ff1 (patch)
treea0479bec69170a6052abf806eee3faeb64aeb861 /spec/features/markdown_spec.rb
parent757084f715ffc06f563bdf971302995a3b181c06 (diff)
parentda8d6feb2c9a273a32b072fbed30f958435c2eeb (diff)
Merge branch 'rs-task_list' into 'master'
Use task_list gem for task lists Task Lists can now be used in comments, and they'll render in previews. :clap: Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2271 See merge request !599
Diffstat (limited to 'spec/features/markdown_spec.rb')
-rw-r--r--spec/features/markdown_spec.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/spec/features/markdown_spec.rb b/spec/features/markdown_spec.rb
index 57d01236505..1746ce128e4 100644
--- a/spec/features/markdown_spec.rb
+++ b/spec/features/markdown_spec.rb
@@ -24,6 +24,7 @@ require 'erb'
# -> Rinku (http, https, ftp)
# -> Other schemes
# -> References
+# -> TaskList
# -> `html_safe`
# -> Template
#
@@ -279,6 +280,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
@@ -289,9 +299,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