Permalink
Browse files

test send_file with inline disposition

  • Loading branch information...
rkh committed Feb 26, 2011
1 parent 9de4278 commit 63022950b4b8bf1cf7f820b1e69c824249010637
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/helpers_test.rb
View
@@ -460,6 +460,12 @@ def send_file_app(opts={})
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'

0 comments on commit 6302295

Please sign in to comment.