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

application_help_spec.rb « slash_commands « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b82121bf3a853474590d5a1f61a9cdc45f447e7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

require 'spec_helper'

RSpec.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