mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 10:20:43 -07:00
Avoid a couple of duplicate assertions (#1675)
This commit is contained in:
@@ -262,7 +262,7 @@ class ContextTest < Minitest::Test
|
|||||||
assigns = { 'product' => { 'variants' => [{ 'title' => 'draft151cm' }, { 'title' => 'element151cm' }] } }
|
assigns = { 'product' => { 'variants' => [{ 'title' => 'draft151cm' }, { 'title' => 'element151cm' }] } }
|
||||||
assert_template_result("draft151cm", '{{ product["variants"][0]["title"] }}', assigns)
|
assert_template_result("draft151cm", '{{ product["variants"][0]["title"] }}', assigns)
|
||||||
assert_template_result("element151cm", '{{ product["variants"][1]["title"] }}', assigns)
|
assert_template_result("element151cm", '{{ product["variants"][1]["title"] }}', assigns)
|
||||||
assert_template_result("draft151cm", '{{ product["variants"][0]["title"] }}', assigns)
|
assert_template_result("draft151cm", '{{ product["variants"].first["title"] }}', assigns)
|
||||||
assert_template_result("element151cm", '{{ product["variants"].last["title"] }}', assigns)
|
assert_template_result("element151cm", '{{ product["variants"].last["title"] }}', assigns)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class IfElseTagTest < Minitest::Test
|
|||||||
def test_if_and
|
def test_if_and
|
||||||
assert_template_result(' YES ', '{% if true and true %} YES {% endif %}')
|
assert_template_result(' YES ', '{% if true and true %} YES {% endif %}')
|
||||||
assert_template_result('', '{% if false and true %} YES {% endif %}')
|
assert_template_result('', '{% if false and true %} YES {% endif %}')
|
||||||
assert_template_result('', '{% if false and true %} YES {% endif %}')
|
assert_template_result('', '{% if true and false %} YES {% endif %}')
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_hash_miss_generates_false
|
def test_hash_miss_generates_false
|
||||||
|
|||||||
Reference in New Issue
Block a user