diff options
author | Peter Leitzen <pl@neopoly.de> | 2018-08-01 17:05:02 +0200 |
---|---|---|
committer | Peter Leitzen <pl@neopoly.de> | 2018-08-10 16:45:11 +0200 |
commit | 2881886417ba08fb4a47fb95f43678578454766d (patch) | |
tree | a3384e281887d25e767c10284a7c5ef81efdbcd2 /spec | |
parent | 56ce46674f93e35b2ed54771c1a54dde21f38685 (diff) | |
download | gitlab-ce-2881886417ba08fb4a47fb95f43678578454766d.tar.gz |
Cannot mark a Commit as todo via `/todo`
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/quick_actions/interpret_service_spec.rb | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/spec/services/quick_actions/interpret_service_spec.rb b/spec/services/quick_actions/interpret_service_spec.rb index af1064d032d..bf1c157c4a2 100644 --- a/spec/services/quick_actions/interpret_service_spec.rb +++ b/spec/services/quick_actions/interpret_service_spec.rb @@ -637,16 +637,6 @@ describe QuickActions::InterpretService do let(:issuable) { merge_request } end - it_behaves_like 'todo command' do - let(:content) { '/todo' } - let(:issuable) { issue } - end - - it_behaves_like 'todo command' do - let(:content) { '/todo' } - let(:issuable) { merge_request } - end - it_behaves_like 'done command' do let(:content) { '/done' } let(:issuable) { issue } @@ -796,6 +786,28 @@ describe QuickActions::InterpretService do let(:issuable) { issue } end + context '/todo' do + let(:content) { '/todo' } + + context 'if issuable is an Issue' do + it_behaves_like 'todo command' do + let(:issuable) { issue } + end + end + + context 'if issuable is a MergeRequest' do + it_behaves_like 'todo command' do + let(:issuable) { merge_request } + end + end + + context 'if issuable is a Commit' do + it_behaves_like 'empty command' do + let(:issuable) { commit } + end + end + end + context '/copy_metadata command' do let(:todo_label) { create(:label, project: project, title: 'To Do') } let(:inreview_label) { create(:label, project: project, title: 'In Review') } |