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
1 changed files with 6 additions and 0 deletions

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'