diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2016-02-01 11:07:59 -0500 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-12 17:20:59 +0100 |
commit | e919b5a4e9dd5e09628daf28b7b96424b764863b (patch) | |
tree | 0557a7a903b32becc1772f5bcf22e993d648b163 /spec | |
parent | 0d866d89ec26bf05f2777ac5e5cb3f23f90f0a8c (diff) | |
download | gitlab-ce-e919b5a4e9dd5e09628daf28b7b96424b764863b.tar.gz |
Fix relative links in other markup formatsben.boeckel/gitlab-ce-fixup-links-in-generic-docs
- Apply the RelativeLinkFilter filter to other formats, e.g.,
reStructuredText so links from the Files view or the Project view work
- Remove the AsciidocPipeline pipeline
Fixes #3533.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/application_helper_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/asciidoc_spec.rb | 16 |
2 files changed, 4 insertions, 16 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 30e353148a8..f6c1005d265 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -293,6 +293,10 @@ describe ApplicationHelper do describe 'render_markup' do let(:content) { 'Noël' } + let(:user) { create(:user) } + before do + allow(helper).to receive(:current_user).and_return(user) + end it 'should preserve encoding' do expect(content.encoding.name).to eq('UTF-8') diff --git a/spec/lib/gitlab/asciidoc_spec.rb b/spec/lib/gitlab/asciidoc_spec.rb index 6beb21c6d2b..736bf787208 100644 --- a/spec/lib/gitlab/asciidoc_spec.rb +++ b/spec/lib/gitlab/asciidoc_spec.rb @@ -42,22 +42,6 @@ module Gitlab end end - context "with project in context" do - - let(:context) { { project: create(:project) } } - - it "should filter converted input via HTML pipeline and return result" do - filtered_html = '<b>ASCII</b>' - - allow(Asciidoctor).to receive(:convert).and_return(html) - expect(Banzai).to receive(:render) - .with(html, context.merge(pipeline: :asciidoc)) - .and_return(filtered_html) - - expect( render('foo', context) ).to eql filtered_html - end - end - def render(*args) described_class.render(*args) end |