diff options
author | Elia Schito <elia@schito.me> | 2012-11-26 23:49:14 +0100 |
---|---|---|
committer | Elia Schito <elia@schito.me> | 2012-11-27 00:21:12 +0100 |
commit | 5d8faa683e230e6af54ac7616f98f3ae088e7682 (patch) | |
tree | f3e09b588ae9cba565649552e2ebccdc9f098514 /actionpack/test | |
parent | 5658923daa2f2c7858f55844168e1872cc611766 (diff) | |
download | rails-5d8faa683e230e6af54ac7616f98f3ae088e7682.tar.gz rails-5d8faa683e230e6af54ac7616f98f3ae088e7682.tar.bz2 rails-5d8faa683e230e6af54ac7616f98f3ae088e7682.zip |
Accept symbols as #send_data :disposition value
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/send_file_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index 8bf3096888..5e9053da5b 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -114,6 +114,18 @@ class SendFileTest < ActionController::TestCase assert_equal 'private', h['Cache-Control'] end + def test_send_file_headers_with_disposition_as_a_symbol + options = { + :type => Mime::PNG, + :disposition => :disposition, + :filename => 'filename' + } + + @controller.headers = {} + @controller.send(:send_file_headers!, options) + assert_equal 'disposition; filename="filename"', @controller.headers['Content-Disposition'] + end + def test_send_file_headers_with_mime_lookup_with_symbol options = { :type => :png |