just a quick test to demonstrate the documentation was wrong (issue #377)
This commit is contained in:
parent
08cf381bc3
commit
57b7cc1ef2
@ -35,4 +35,10 @@ describe Locomotive::Liquid::Filters::Date do
|
||||
format_date(@date).should == '06/29/2007'
|
||||
end
|
||||
|
||||
it 'prints a date within a template (from the documentation)' do
|
||||
template = Liquid::Template.parse("{{ today | localized_date: '%d %B', 'fr' }}")
|
||||
context = Liquid::Context.new({}, { 'today' => @date }, {})
|
||||
template.render(context).should == '29 juin'
|
||||
end
|
||||
|
||||
end
|
@ -47,6 +47,7 @@ describe Locomotive::Liquid::Filters::Resize do
|
||||
end
|
||||
|
||||
context 'when no resize string is given' do
|
||||
|
||||
before :each do
|
||||
@template = Liquid::Template.parse('{{ asset | resize: }}')
|
||||
end
|
||||
@ -54,6 +55,7 @@ describe Locomotive::Liquid::Filters::Resize do
|
||||
it 'returns a liquid error' do
|
||||
@template.render(@context).should include 'Liquid error: wrong number of arguments'
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user