e8dd299e7c
This improves the output produced when running an unknown command, running the "help" command, and when trying to run a command you are not allowed to run. The new help output includes links to the project of the chatops integration, and a link to the chatops documentation.
20 lines
558 B
Ruby
20 lines
558 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'spec_helper'
|
|
|
|
describe Gitlab::SlashCommands::ApplicationHelp do
|
|
let(:params) { { command: '/gitlab', text: 'help' } }
|
|
let(:project) { build(:project) }
|
|
|
|
describe '#execute' do
|
|
subject do
|
|
described_class.new(project, params).execute
|
|
end
|
|
|
|
it 'displays the help section' do
|
|
expect(subject[:response_type]).to be(:ephemeral)
|
|
expect(subject[:text]).to include('Available commands')
|
|
expect(subject[:text]).to include('/gitlab [project name or alias] issue show')
|
|
end
|
|
end
|
|
end
|