2019-02-20 16:29:48 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe Gitlab::SlashCommands::ApplicationHelp do
|
2019-02-20 16:29:48 -05:00
|
|
|
let(:params) { { command: '/gitlab', text: 'help' } }
|
2019-08-26 08:23:36 -04:00
|
|
|
let(:project) { build(:project) }
|
2019-02-20 16:29:48 -05:00
|
|
|
|
|
|
|
describe '#execute' do
|
|
|
|
subject do
|
2019-08-26 08:23:36 -04:00
|
|
|
described_class.new(project, params).execute
|
2019-02-20 16:29:48 -05:00
|
|
|
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
|