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:
authorRobert Speicher <rspeicher@gmail.com>2016-08-19 00:38:42 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-08-19 00:41:16 +0300
commit717366d28da11acc6dbe60301bf7e2394400b3c1 (patch)
treeba3a95c9bf1627519c00dab30562d5cd4f646857 /spec/services/todo_service_spec.rb
parentd97c83096a70ed102f993d4c484aff9c786ca831 (diff)
parent2703330a19e813351e9c33241a59d6b7f54741df (diff)
Merge branch '4273-slash-commands' into 'master'
Support slash commands in issues / MR description & comments See merge request !5021
Diffstat (limited to 'spec/services/todo_service_spec.rb')
-rw-r--r--spec/services/todo_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/todo_service_spec.rb b/spec/services/todo_service_spec.rb
index a2a1d5e6d30..296fd1bd5a4 100644
--- a/spec/services/todo_service_spec.rb
+++ b/spec/services/todo_service_spec.rb
@@ -300,6 +300,18 @@ describe TodoService, services: true do
should_create_todo(user: author, target: unassigned_issue, action: Todo::MARKED)
end
end
+
+ describe '#todo_exists?' do
+ it 'returns false when no todo exist for the given issuable' do
+ expect(service.todo_exist?(unassigned_issue, author)).to be_falsy
+ end
+
+ it 'returns true when a todo exist for the given issuable' do
+ service.mark_todo(unassigned_issue, author)
+
+ expect(service.todo_exist?(unassigned_issue, author)).to be_truthy
+ end
+ end
end
describe 'Merge Requests' do