mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Failing test for integer drop lookup.
This commit is contained in:
@@ -36,7 +36,7 @@ class ProductDrop < Liquid::Drop
|
||||
|
||||
class CatchallDrop < Liquid::Drop
|
||||
def before_method(method)
|
||||
return 'method: ' << method
|
||||
return 'method: ' << method.to_s
|
||||
end
|
||||
end
|
||||
|
||||
@@ -94,6 +94,11 @@ class DropsTest < Test::Unit::TestCase
|
||||
|
||||
end
|
||||
|
||||
def test_integer_argument_drop
|
||||
output = Liquid::Template.parse( ' {{ product.catchall[8] }} ' ).render('product' => ProductDrop.new)
|
||||
assert_equal ' method: 8 ', output
|
||||
end
|
||||
|
||||
def test_text_array_drop
|
||||
output = Liquid::Template.parse( '{% for text in product.texts.array %} {{text}} {% endfor %}' ).render('product' => ProductDrop.new)
|
||||
assert_equal ' text1 text2 ', output
|
||||
|
||||
Reference in New Issue
Block a user