add test for when expires fails because of Time.parse

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
This commit is contained in:
Gabriel Horner 2011-04-11 13:11:33 +02:00 committed by Konstantin Haase
parent 7e48254f03
commit 0522f10fa8
1 changed files with 8 additions and 0 deletions

View File

@ -646,6 +646,10 @@ class HelpersTest < Test::Unit::TestCase
expires obj, :public, :no_cache
'Hello World'
end
get '/boom' do
expires '1000'
end
end
end
@ -673,6 +677,10 @@ class HelpersTest < Test::Unit::TestCase
get '/blah'
assert_equal ['public', 'no-cache', 'max-age=60'], response['Cache-Control'].split(', ')
end
it 'fails when Time.parse raises an ArgumentError' do
assert_raise(RuntimeError) { get '/boom' }
end
end
describe 'last_modified' do