1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/ruby-liquid/tests-disable-tests-broken-on-ruby-2.7.patch
Jakub Jirutka 0fd5a9a782 testing/ruby-liquid: new aport
Required for jekyll.
2021-07-01 13:38:53 +02:00

61 lines
2.3 KiB
Diff

From 48ed7aa9c516aa9ddef53fed0ffcd6705f814a23 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Fri, 31 Jan 2020 17:29:49 +0100
Subject: [PATCH 2/2] tests/integration/drop_test: disable tests broken with ruby 2.7
---
test/integration/drop_test.rb | 36 +++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
Patch-Source: https://src.fedoraproject.org/rpms/rubygem-liquid/raw/f34/f/02-tests-integration-drop_test-disable-tests-broken-wit.patch
diff --git a/test/integration/drop_test.rb b/test/integration/drop_test.rb
index 2de4a5a..4881a5f 100644
--- a/test/integration/drop_test.rb
+++ b/test/integration/drop_test.rb
@@ -112,24 +112,24 @@ class DropsTest < Minitest::Test
assert_equal ' ', tpl.render!('product' => ProductDrop.new)
end
- def test_rendering_raises_on_tainted_attr
- with_taint_mode(:error) do
- tpl = Liquid::Template.parse('{{ product.user_input }}')
- assert_raises TaintedError do
- tpl.render!('product' => ProductDrop.new)
- end
- end
- end
-
- def test_rendering_warns_on_tainted_attr
- with_taint_mode(:warn) do
- tpl = Liquid::Template.parse('{{ product.user_input }}')
- context = Context.new('product' => ProductDrop.new)
- tpl.render!(context)
- assert_equal [Liquid::TaintedError], context.warnings.map(&:class)
- assert_equal "variable 'product.user_input' is tainted and was not escaped", context.warnings.first.to_s(false)
- end
- end
+# def test_rendering_raises_on_tainted_attr
+# with_taint_mode(:error) do
+# tpl = Liquid::Template.parse('{{ product.user_input }}')
+# assert_raises TaintedError do
+# tpl.render!('product' => ProductDrop.new)
+# end
+# end
+# end
+
+# def test_rendering_warns_on_tainted_attr
+# with_taint_mode(:warn) do
+# tpl = Liquid::Template.parse('{{ product.user_input }}')
+# context = Context.new('product' => ProductDrop.new)
+# tpl.render!(context)
+# assert_equal [Liquid::TaintedError], context.warnings.map(&:class)
+# assert_equal "variable 'product.user_input' is tainted and was not escaped", context.warnings.first.to_s(false)
+# end
+# end
def test_rendering_doesnt_raise_on_escaped_tainted_attr
with_taint_mode(:error) do
--
2.24.1