From 78dc1b58a64be03e6d3622aab5605e1d5f6a6643 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Mon, 4 Mar 2019 09:21:47 +0000 Subject: Show commands applied message when promoting issues Fix 'commands applied' messages not being shown when issue is promoted to epic using slash commands. --- spec/services/notes/quick_actions_service_spec.rb | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'spec/services/notes/quick_actions_service_spec.rb') 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 -- cgit v1.2.3