diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-08-18 16:38:42 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-08-18 16:41:16 -0500 |
commit | 717366d28da11acc6dbe60301bf7e2394400b3c1 (patch) | |
tree | ba3a95c9bf1627519c00dab30562d5cd4f646857 /spec/services/todo_service_spec.rb | |
parent | d97c83096a70ed102f993d4c484aff9c786ca831 (diff) | |
parent | 2703330a19e813351e9c33241a59d6b7f54741df (diff) | |
download | gitlab-ce-717366d28da11acc6dbe60301bf7e2394400b3c1.tar.gz |
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.rb | 12 |
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 |