summaryrefslogtreecommitdiff
path: root/spec/services/mattermost/slash_command_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/mattermost/slash_command_service_spec.rb')
-rw-r--r--spec/services/mattermost/slash_command_service_spec.rb21
1 files changed, 5 insertions, 16 deletions
diff --git a/spec/services/mattermost/slash_command_service_spec.rb b/spec/services/mattermost/slash_command_service_spec.rb
index e1bfd073ef4..14c2d9b7c37 100644
--- a/spec/services/mattermost/slash_command_service_spec.rb
+++ b/spec/services/mattermost/slash_command_service_spec.rb
@@ -7,23 +7,12 @@ describe Mattermost::SlashCommandService, service: true do
subject { described_class.new(project, user, params).execute }
- describe '#execute' do
- context 'no command service is triggered' do
- let(:params) { { text: 'unknown_command' } }
+ 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)
- it 'shows the help messages' do
- expect(subject[:response_type]).to be :ephemeral
- expect(subject[:text]).to start_with 'Sadly, the used command'
- end
- end
-
- context 'a valid command is executed' do
- let(:issue) { create(:issue, project: project) }
- let(:params) { { text: "issue show #{issue.iid}" } }
-
- it 'a resource is presented to the user' do
- expect(subject[:response_type]).to be :in_channel
- expect(subject[:text]).to match issue.title
+ subject
end
end
end