diff options
author | Felipe Artur <fcardozo@gitlab.com> | 2019-03-04 12:21:47 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-03-04 12:21:47 +0300 |
commit | 78dc1b58a64be03e6d3622aab5605e1d5f6a6643 (patch) | |
tree | d0dd8c328bb0c7ce2311c79f525f7f23db9e0ff0 /spec/services/notes/quick_actions_service_spec.rb | |
parent | 4b0036b87ee30ce0a3687dd052514b571f4d520f (diff) |
Show commands applied message when promoting issues
Fix 'commands applied' messages not being shown when issue is promoted to epic
using slash commands.
Diffstat (limited to 'spec/services/notes/quick_actions_service_spec.rb')
-rw-r--r-- | spec/services/notes/quick_actions_service_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/services/notes/quick_actions_service_spec.rb b/spec/services/notes/quick_actions_service_spec.rb index 14d62763a5b..7d2b6d5b8a7 100644 --- a/spec/services/notes/quick_actions_service_spec.rb +++ b/spec/services/notes/quick_actions_service_spec.rb @@ -28,8 +28,8 @@ describe Notes::QuickActionsService do end it 'closes noteable, sets labels, assigns, and sets milestone to noteable, and leave no note' do - content, command_params = service.extract_commands(note) - service.execute(command_params, note) + content, update_params = service.execute(note) + service.apply_updates(update_params, note) expect(content).to eq '' expect(note.noteable).to be_closed @@ -47,8 +47,8 @@ describe Notes::QuickActionsService do let(:note_text) { '/reopen' } it 'opens the noteable, and leave no note' do - content, command_params = service.extract_commands(note) - service.execute(command_params, note) + content, update_params = service.execute(note) + service.apply_updates(update_params, note) expect(content).to eq '' expect(note.noteable).to be_open @@ -59,8 +59,8 @@ describe Notes::QuickActionsService do let(:note_text) { '/spend 1h' } it 'updates the spent time on the noteable' do - content, command_params = service.extract_commands(note) - service.execute(command_params, note) + content, update_params = service.execute(note) + service.apply_updates(update_params, note) expect(content).to eq '' expect(note.noteable.time_spent).to eq(3600) @@ -75,8 +75,8 @@ describe Notes::QuickActionsService do end it 'closes noteable, sets labels, assigns, and sets milestone to noteable' do - content, command_params = service.extract_commands(note) - service.execute(command_params, note) + content, update_params = service.execute(note) + service.apply_updates(update_params, note) expect(content).to eq "HELLO\nWORLD" expect(note.noteable).to be_closed @@ -94,8 +94,8 @@ describe Notes::QuickActionsService do let(:note_text) { "HELLO\n/reopen\nWORLD" } it 'opens the noteable' do - content, command_params = service.extract_commands(note) - service.execute(command_params, note) + content, update_params = service.execute(note) + service.apply_updates(update_params, note) expect(content).to eq "HELLO\nWORLD" expect(note.noteable).to be_open @@ -190,8 +190,8 @@ describe Notes::QuickActionsService do end it 'adds only one assignee from the list' do - _, command_params = service.extract_commands(note) - service.execute(command_params, note) + _, update_params = service.execute(note) + service.apply_updates(update_params, note) expect(note.noteable.assignees.count).to eq(1) end |