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

services_helper_spec.rb « helpers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 10d6ec7b6a7d0ba8aebd627d729c5c445946fd84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe ServicesHelper do
  describe 'event_action_title' do
    it { expect(event_action_title('comment')).to eq 'Comment' }
    it { expect(event_action_title('something')).to eq 'Something' }
  end

  describe '#integration_form_data' do
    subject { helper.integration_form_data(integration) }

    context 'Jira service' do
      let(:integration) { build(:jira_service) }

      it 'includes Jira specific fields' do
        is_expected.to include(
          :id,
          :show_active,
          :activated,
          :type,
          :merge_request_events,
          :commit_events,
          :enable_comments,
          :comment_detail,
          :trigger_events,
          :fields,
          :inherit_from_id
        )
      end
    end
  end
end