2019-10-08 12:06:01 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-08-29 07:56:52 +00:00
|
|
|
require 'spec_helper'
|
2017-08-24 14:34:36 +00: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 20:10:55 +00: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 14:34:36 +00: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
|