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/lib/gitlab/quick_actions | |
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/lib/gitlab/quick_actions')
-rw-r--r-- | spec/lib/gitlab/quick_actions/command_definition_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/lib/gitlab/quick_actions/command_definition_spec.rb b/spec/lib/gitlab/quick_actions/command_definition_spec.rb index 5dae82a63b4..136cfb5bcc5 100644 --- a/spec/lib/gitlab/quick_actions/command_definition_spec.rb +++ b/spec/lib/gitlab/quick_actions/command_definition_spec.rb @@ -72,7 +72,7 @@ describe Gitlab::QuickActions::CommandDefinition do end describe "#execute" do - let(:context) { OpenStruct.new(run: false) } + let(:context) { OpenStruct.new(run: false, commands_executed_count: nil) } context "when the command is a noop" do it "doesn't execute the command" do @@ -80,6 +80,7 @@ describe Gitlab::QuickActions::CommandDefinition do subject.execute(context, nil) + expect(context.commands_executed_count).to be_nil expect(context.run).to be false end end @@ -97,6 +98,7 @@ describe Gitlab::QuickActions::CommandDefinition do it "doesn't execute the command" do subject.execute(context, nil) + expect(context.commands_executed_count).to be_nil expect(context.run).to be false end end @@ -112,6 +114,7 @@ describe Gitlab::QuickActions::CommandDefinition do subject.execute(context, true) expect(context.run).to be true + expect(context.commands_executed_count).to eq(1) end end @@ -120,6 +123,7 @@ describe Gitlab::QuickActions::CommandDefinition do subject.execute(context, nil) expect(context.run).to be true + expect(context.commands_executed_count).to eq(1) end end end @@ -134,6 +138,7 @@ describe Gitlab::QuickActions::CommandDefinition do subject.execute(context, true) expect(context.run).to be true + expect(context.commands_executed_count).to eq(1) end end |