summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-01-26 22:19:50 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-01-26 22:19:50 +0800
commit406dfd6e0f39efc7c7310b968d5ed86461286e04 (patch)
tree5246f76c22c1bcf845524fcf924f03382e853823 /spec/support
parent8f3aa6ac338ee3595909fea9938611fb03187e6a (diff)
parentd6bc24def19cb36a9ee3527de61e3dce92c462eb (diff)
downloadgitlab-ce-406dfd6e0f39efc7c7310b968d5ed86461286e04.tar.gz
Merge remote-tracking branch 'upstream/master' into fix-git-hooks-when-creating-file
* upstream/master: Ensure we have a project with a repo in GitlabMarkdownHelper specs Revert "Make sure TraceReader uses Encoding.default_external" Make sure TraceReader uses Encoding.default_external Update CONTRIBUTING.md after merging "up-for-grabs" and "Accepting Merge Requests" [ci skip] Use `:empty_project` where possible in finder specs Use `empty_project` where possible in controller specs Use `:empty_project` where possible in helper specs Don’t count tasks that are not defined as list items correctly Use a project factory with a repository where necessary Use `:empty_project` where possible throughout spec/lib Use hashrocket for dasherized attribute Remove markdown file extension and add anchor to link Fixed builds info link on project settings page Factories with a project association use `:empty_project` by default Update enviroments.md the example for deleting an environment is missing the "s" in environments. curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/environments/1" wil 404
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/taskable_shared_examples.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/support/taskable_shared_examples.rb b/spec/support/taskable_shared_examples.rb
index 1b6c33248c9..4056ff06b84 100644
--- a/spec/support/taskable_shared_examples.rb
+++ b/spec/support/taskable_shared_examples.rb
@@ -72,6 +72,25 @@ shared_examples 'a Taskable' do
end
end
+ describe 'with tasks that are not formatted correctly' do
+ before do
+ subject.description = <<-EOT.strip_heredoc
+ [ ] task 1
+ [ ] task 2
+
+ - [ ]task 1
+ -[ ] task 2
+ EOT
+ end
+
+ it 'returns the correct task status' do
+ expect(subject.task_status).to match('0 of')
+ expect(subject.task_status).to match('0 tasks completed')
+ expect(subject.task_status_short).to match('0/')
+ expect(subject.task_status_short).to match('0 task')
+ end
+ end
+
describe 'with a complete task' do
before do
subject.description = <<-EOT.strip_heredoc