diff options
Diffstat (limited to 'spec/features/help_pages_spec.rb')
-rw-r--r-- | spec/features/help_pages_spec.rb | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/spec/features/help_pages_spec.rb b/spec/features/help_pages_spec.rb index 88a7aa51326..1ba3849fe2c 100644 --- a/spec/features/help_pages_spec.rb +++ b/spec/features/help_pages_spec.rb @@ -4,35 +4,9 @@ require 'spec_helper' describe 'Help Pages' do describe 'Get the main help page' do - shared_examples_for 'help page' do |prefix: ''| - it 'prefixes links correctly' do - expect(page).to have_selector(%(div.documentation-index > table tbody tr td a[href="#{prefix}/help/api/README.md"])) - end - end - - context 'without a trailing slash' do - before do - visit help_path - end - - it_behaves_like 'help page' - end - - context 'with a trailing slash' do - before do - visit help_path + '/' - end - - it_behaves_like 'help page' - end - - context 'with a relative installation' do - before do - stub_config_setting(relative_url_root: '/gitlab') - visit help_path - end - - it_behaves_like 'help page', prefix: '/gitlab' + before do + allow(File).to receive(:read).and_call_original + allow(File).to receive(:read).with(Rails.root.join('doc', 'README.md')).and_return(fixture_file('sample_doc.md')) end context 'quick link shortcuts', :js do |