diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-22 15:40:42 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-22 15:40:42 +0200 |
commit | 46025ffb8c717eedced397edd19ce8f0d67802e7 (patch) | |
tree | 9283641b913de8490d7b3cb96b03ac7b1b5df756 /spec/lib | |
parent | aa4007a597ea6c7de11a8f37de2fd889aa6e6646 (diff) | |
download | gitlab-ce-46025ffb8c717eedced397edd19ce8f0d67802e7.tar.gz |
Fix specs
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/markdown/sanitization_filter_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/markdown/sanitization_filter_spec.rb b/spec/lib/gitlab/markdown/sanitization_filter_spec.rb index e50c82d0b3c..8243c994600 100644 --- a/spec/lib/gitlab/markdown/sanitization_filter_spec.rb +++ b/spec/lib/gitlab/markdown/sanitization_filter_spec.rb @@ -93,16 +93,16 @@ module Gitlab::Markdown end end - context 'when pipeline is :description' do + context 'when inline_sanitization is true' do it 'uses a stricter whitelist' do - doc = filter('<h1>Description</h1>', pipeline: :description) + doc = filter('<h1>Description</h1>', inline_sanitization: true) expect(doc.to_html.strip).to eq 'Description' end %w(pre code img ol ul li).each do |elem| it "removes '#{elem}' elements" do act = "<#{elem}>Description</#{elem}>" - expect(filter(act, pipeline: :description).to_html.strip). + expect(filter(act, inline_sanitization: true).to_html.strip). to eq 'Description' end end @@ -110,7 +110,7 @@ module Gitlab::Markdown %w(b i strong em a ins del sup sub p).each do |elem| it "still allows '#{elem}' elements" do exp = act = "<#{elem}>Description</#{elem}>" - expect(filter(act, pipeline: :description).to_html).to eq exp + expect(filter(act, inline_sanitization: true).to_html).to eq exp end end end |