Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/chat_commands/command_spec.rb')
-rw-r--r--spec/lib/gitlab/chat_commands/command_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/lib/gitlab/chat_commands/command_spec.rb b/spec/lib/gitlab/chat_commands/command_spec.rb
new file mode 100644
index 00000000000..d28349ff1d8
--- /dev/null
+++ b/spec/lib/gitlab/chat_commands/command_spec.rb
@@ -0,0 +1,19 @@
+require 'spec_helper'
+
+describe Gitlab::ChatCommands::Command, service: true do
+ let(:project) { create(:project) }
+ let(:user) { create(:user) }
+ let(:params) { { text: 'issue show 1' } }
+
+ subject { described_class.new(project, user, params).execute }
+
+ xdescribe '#execute' do
+ context 'when issue show is triggered' do
+ it 'calls IssueShowService' do
+ expect_any_instance_of(Mattermost::Commands::IssueShowService).to receive(:new).with(project, user, params)
+
+ subject
+ end
+ end
+ end
+end