diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-02-13 20:04:27 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-02-13 20:04:27 +0300 |
commit | ace8b0abbd4c0cbbfba9b2e0dbeaf2350b5f9b66 (patch) | |
tree | bf94104fe8e3720af36ad73d865978f454e8d79a /spec | |
parent | 0f2dc6a7d7c30b84fb241baa592c37e7c5f49e48 (diff) | |
parent | e919b5a4e9dd5e09628daf28b7b96424b764863b (diff) |
Merge branch 'ben.boeckel/gitlab-ce-fixup-links-in-generic-docs' into 'master'
Fix relative links in other markup formats
_Originally opened at !1845 by @ben.boeckel._
- - -
The RelativeLinkFilter was not applied to other document formats, e.g.,
reStructuredText, so links from the Files view or the Project view did
not work.
Fixes #3533.
See merge request !2798
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 |