debian-mirror-gitlab/spec/lib/gitlab/slash_commands/application_help_spec.rb

21 lines
564 B
Ruby
Raw Normal View History

2019-07-07 11:18:12 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::SlashCommands::ApplicationHelp do
2019-07-07 11:18:12 +05:30
let(:params) { { command: '/gitlab', text: 'help' } }
2019-12-04 20:38:33 +05:30
let(:project) { build(:project) }
2019-07-07 11:18:12 +05:30
describe '#execute' do
subject do
2019-12-04 20:38:33 +05:30
described_class.new(project, params).execute
2019-07-07 11:18:12 +05:30
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