summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/asciidoc_spec.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-04-24 12:21:10 +0200
committerToon Claes <toon@gitlab.com>2017-04-27 13:22:17 +0200
commited6ed251afc67f743dbe7b0d22ce76713696fa13 (patch)
tree6b4f6f667c119514ad94be7c849d023d4cdd0c4e /spec/lib/gitlab/asciidoc_spec.rb
parenta53442751f77cd586a511c5a539341377ec22807 (diff)
downloadgitlab-ce-ed6ed251afc67f743dbe7b0d22ce76713696fa13.tar.gz
Remove unused optional parameter `asciidoc_opts`
Diffstat (limited to 'spec/lib/gitlab/asciidoc_spec.rb')
-rw-r--r--spec/lib/gitlab/asciidoc_spec.rb21
1 files changed, 2 insertions, 19 deletions
diff --git a/spec/lib/gitlab/asciidoc_spec.rb b/spec/lib/gitlab/asciidoc_spec.rb
index bca57105d1d..0f47fb2fbd9 100644
--- a/spec/lib/gitlab/asciidoc_spec.rb
+++ b/spec/lib/gitlab/asciidoc_spec.rb
@@ -22,26 +22,9 @@ module Gitlab
expect(Asciidoctor).to receive(:convert)
.with(input, expected_asciidoc_opts).and_return(html)
- expect( render(input, context) ).to eql html
+ expect(render(input)).to eq(html)
end
- context "with asciidoc_opts" do
- let(:asciidoc_opts) { { safe: :safe, attributes: ['foo'] } }
-
- it "merges the options with default ones" do
- expected_asciidoc_opts = {
- safe: :safe,
- backend: :gitlab_html5,
- attributes: described_class::DEFAULT_ADOC_ATTRS + ['foo']
- }
-
- expect(Asciidoctor).to receive(:convert)
- .with(input, expected_asciidoc_opts).and_return(html)
-
- render(input, context, asciidoc_opts)
- end
- end
-
context "XSS" do
links = {
'links' => {
@@ -60,7 +43,7 @@ module Gitlab
links.each do |name, data|
it "does not convert dangerous #{name} into HTML" do
- expect(render(data[:input], context)).to eql data[:output]
+ expect(render(data[:input])).to eq(data[:output])
end
end
end