2019-12-21 20:55:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
require 'spec_helper'
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe 'help/instance_configuration' do
|
2018-03-17 18:26:18 +05:30
|
|
|
describe 'General Sections:' do
|
2022-10-11 01:57:18 +05:30
|
|
|
let(:instance_configuration) { build(:instance_configuration) }
|
2018-03-17 18:26:18 +05:30
|
|
|
let(:settings) { instance_configuration.settings }
|
|
|
|
let(:ssh_settings) { settings[:ssh_algorithms_hashes] }
|
|
|
|
|
|
|
|
before do
|
2021-11-11 11:23:49 +05:30
|
|
|
create(:plan, name: 'plan1', title: 'Plan 1')
|
2018-03-17 18:26:18 +05:30
|
|
|
assign(:instance_configuration, instance_configuration)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'has links to several sections' do
|
|
|
|
render
|
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
expect(rendered).to have_link(nil, href: '#ssh-host-keys-fingerprints') if ssh_settings.any?
|
|
|
|
expect(rendered).to have_link(nil, href: '#gitlab-pages')
|
2021-11-11 11:23:49 +05:30
|
|
|
expect(rendered).to have_link(nil, href: '#size-limits')
|
|
|
|
expect(rendered).to have_link(nil, href: '#package-registry')
|
|
|
|
expect(rendered).to have_link(nil, href: '#rate-limits')
|
2022-07-16 23:28:13 +05:30
|
|
|
expect(rendered).to have_link(nil, href: '#ci-cd-limits')
|
2018-03-17 18:26:18 +05:30
|
|
|
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')
|
2021-11-11 11:23:49 +05:30
|
|
|
expect(rendered).to have_css('h2#size-limits')
|
|
|
|
expect(rendered).to have_css('h2#package-registry')
|
|
|
|
expect(rendered).to have_css('h2#rate-limits')
|
2022-07-16 23:28:13 +05:30
|
|
|
expect(rendered).to have_css('h2#ci-cd-limits')
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|