1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

test send_file with inline disposition

This commit is contained in:
Konstantin Haase 2011-02-26 15:49:10 +01:00
parent 9de42785b4
commit 63022950b4

View file

@ -460,6 +460,12 @@ class HelpersTest < Test::Unit::TestCase
assert_equal 'attachment; filename="file.txt"', response['Content-Disposition']
end
it "sets the Content-Disposition header when :disposition set to 'inline'" do
send_file_app :disposition => 'inline'
get '/file.txt'
assert_equal 'inline', response['Content-Disposition']
end
it "sets the Content-Disposition header when :filename provided" do
send_file_app :filename => 'foo.txt'
get '/file.txt'