add test for when expires fails because of Time.parse
Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
This commit is contained in:
parent
7e48254f03
commit
0522f10fa8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue