2019-10-08 08:06:01 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-08-29 03:56:52 -04:00
|
|
|
require 'spec_helper'
|
2017-08-24 10:34:36 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2019-01-11 15:10:55 -05:00
|
|
|
expect(rendered).to have_link(nil, href: '#ssh-host-keys-fingerprints') if ssh_settings.any?
|
|
|
|
expect(rendered).to have_link(nil, href: '#gitlab-pages')
|
|
|
|
expect(rendered).to have_link(nil, href: '#gitlab-ci')
|
2017-08-24 10:34:36 -04:00
|
|
|
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
|