mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Added tests to verify that {{ 'now' | date :'%Y' }} and {{ 'today' | date :'%Y' }} work.
In the case of Ruby 1.9.3, 'now' is no longer parsed. For safe measures, I've added 'today' as well.
This commit is contained in:
@@ -103,6 +103,8 @@ class StandardFiltersTest < Test::Unit::TestCase
|
||||
assert_equal '07/05/2006', @filters.date("2006-07-05 10:00:00", "%m/%d/%Y")
|
||||
|
||||
assert_equal "07/16/2004", @filters.date("Fri Jul 16 01:00:00 2004", "%m/%d/%Y")
|
||||
assert_equal "#{Date.today.year}", @filters.date('now', '%Y')
|
||||
assert_equal "#{Date.today.year}", @filters.date('today', '%Y')
|
||||
|
||||
assert_equal nil, @filters.date(nil, "%B")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user