diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-18 08:33:13 -0500 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-24 15:08:16 +0100 |
commit | f30ad3ff1f958ccb783f3fab68269e61f1a79b3d (patch) | |
tree | a536ce0434491d3dc9ea851220932bd146f04d60 /spec/support | |
parent | cdf0af666c04290ece320e39a890af75f2e7d7e4 (diff) | |
download | gitlab-ce-f30ad3ff1f958ccb783f3fab68269e61f1a79b3d.tar.gz |
fix nested tasks in ordered list
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/taskable_shared_examples.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/support/taskable_shared_examples.rb b/spec/support/taskable_shared_examples.rb index ad1c783df4d..1b6c33248c9 100644 --- a/spec/support/taskable_shared_examples.rb +++ b/spec/support/taskable_shared_examples.rb @@ -33,6 +33,30 @@ shared_examples 'a Taskable' do end end + describe 'with nested tasks' do + before do + subject.description = <<-EOT.strip_heredoc + - [ ] Task a + - [x] Task a.1 + - [ ] Task a.2 + - [ ] Task b + + 1. [ ] Task 1 + 1. [ ] Task 1.1 + 1. [ ] Task 1.2 + 1. [x] Task 2 + 1. [x] Task 2.1 + EOT + end + + it 'returns the correct task status' do + expect(subject.task_status).to match('3 of') + expect(subject.task_status).to match('9 tasks completed') + expect(subject.task_status_short).to match('3/') + expect(subject.task_status_short).to match('9 tasks') + end + end + describe 'with an incomplete task' do before do subject.description = <<-EOT.strip_heredoc |