mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
filtered variables for assign, case, and cycle
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
require File.dirname(__FILE__) + '/helper'
|
||||
|
||||
class IfElseTest < Test::Unit::TestCase
|
||||
include Liquid
|
||||
|
||||
def test_with_filtered_expressions
|
||||
assert_template_result('foo','{% assign foo = values|sort|last %}{{ foo }}', 'values' => %w{foo bar baz})
|
||||
assert_template_result('foo','{% assign sorted = values|sort %}{{ sorted | last }}', 'values' => %w{foo bar baz})
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user