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

instance_configuration.html.haml_spec.rb « help « views « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f30b5881fde3f02f72c37bc3f96b260527a1b20f (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
require 'rails_helper'

describe 'help/instance_configuration' do
  describe 'General Sections:' do
    let(:instance_configuration) { build(:instance_configuration)}
    let(:settings) { instance_configuration.settings }
    let(:ssh_settings) { settings[:ssh_algorithms_hashes] }

    before do
      assign(:instance_configuration, instance_configuration)
    end

    it 'has links to several sections' do
      render

      expect(rendered).to have_link(nil, '#ssh-host-keys-fingerprints') if ssh_settings.any?
      expect(rendered).to have_link(nil, '#gitlab-pages')
      expect(rendered).to have_link(nil, '#gitlab-ci')
    end

    it 'has several sections' do
      render

      expect(rendered).to have_css('h2#ssh-host-keys-fingerprints') if ssh_settings.any?
      expect(rendered).to have_css('h2#gitlab-pages')
      expect(rendered).to have_css('h2#gitlab-ci')
    end
  end
end