diff options
author | Francisco Lopez <fjsanpedro@gmail.com> | 2017-08-24 16:34:36 +0200 |
---|---|---|
committer | Francisco Lopez <fjlopez@gitlab.com> | 2017-10-25 23:51:26 +0300 |
commit | 294f40e2c8f51239bfa0e3514e7fe4f3c8ae00cb (patch) | |
tree | dabae15824cce9c6e838751d872229a5fdfeed21 /spec/views/help | |
parent | 3ddffec0d62146e27298a982a7d2935dbe518fb9 (diff) | |
download | gitlab-ce-294f40e2c8f51239bfa0e3514e7fe4f3c8ae00cb.tar.gz |
Added ssh fingerprint, gitlab ci and pages information in an instance configuration page
Closes #25142
Diffstat (limited to 'spec/views/help')
-rw-r--r-- | spec/views/help/index.html.haml_spec.rb | 8 | ||||
-rw-r--r-- | spec/views/help/instance_configuration.html.haml_spec.rb | 29 |
2 files changed, 37 insertions, 0 deletions
diff --git a/spec/views/help/index.html.haml_spec.rb b/spec/views/help/index.html.haml_spec.rb index c030129559e..0a78606171d 100644 --- a/spec/views/help/index.html.haml_spec.rb +++ b/spec/views/help/index.html.haml_spec.rb @@ -25,6 +25,14 @@ describe 'help/index' do end end + describe 'instance configuration link' do + it 'is visible to guests' do + render + + expect(rendered).to have_link(nil, help_instance_configuration_url) + end + end + def stub_user(user = double) allow(view).to receive(:user_signed_in?).and_return(user) end diff --git a/spec/views/help/instance_configuration.html.haml_spec.rb b/spec/views/help/instance_configuration.html.haml_spec.rb new file mode 100644 index 00000000000..f30b5881fde --- /dev/null +++ b/spec/views/help/instance_configuration.html.haml_spec.rb @@ -0,0 +1,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 |