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:
parent
9de42785b4
commit
63022950b4
1 changed files with 6 additions and 0 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue