Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit f28a494

Browse files
committed
Test more complicated nesting
Clean up leftover debugging.
1 parent 9095980 commit f28a494

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

test/task_list/filter_test.rb

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,27 @@ def test_handles_nested_items
8383
- [ ] one
8484
- [ ] one.one
8585
md
86-
puts filter(text)[:output].to_s
8786
assert item = filter(text)[:output].css('.task-list-item .task-list-item').pop
8887
end
8988

89+
def test_handles_complicated_nested_items
90+
text = <<-md
91+
- [ ] one
92+
- [ ] one.one
93+
- [x] one.two
94+
- [ ] one.two.one
95+
- [ ] one.two.two
96+
- [ ] one.three
97+
- [ ] one.four
98+
- [ ] two
99+
- [x] two.one
100+
- [ ] two.two
101+
- [ ] three
102+
md
103+
assert_equal 6 + 2, filter(text)[:output].css('.task-list-item .task-list-item').size
104+
assert_equal 2, filter(text)[:output].css('.task-list-item .task-list-item .task-list-item').size
105+
end
106+
90107
protected
91108

92109
def filter(input, context = @context, result = nil)

0 commit comments

Comments
 (0)