diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-04 16:30:16 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-04 16:30:16 -0700 |
commit | f9734f2b0f5326c399d1c1cccba8b6d8e7d9bdd4 (patch) | |
tree | 9292d10e6d998e645724d43d71fa1d019b90ad80 /actionpack/test/dispatch | |
parent | 28bb1885f5a35d0adecd35d38b73751d737891c4 (diff) | |
download | rails-f9734f2b0f5326c399d1c1cccba8b6d8e7d9bdd4.tar.gz rails-f9734f2b0f5326c399d1c1cccba8b6d8e7d9bdd4.tar.bz2 rails-f9734f2b0f5326c399d1c1cccba8b6d8e7d9bdd4.zip |
adding tests for uploaded file
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/uploaded_file_test.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/uploaded_file_test.rb b/actionpack/test/dispatch/uploaded_file_test.rb new file mode 100644 index 0000000000..def6289fb3 --- /dev/null +++ b/actionpack/test/dispatch/uploaded_file_test.rb @@ -0,0 +1,25 @@ +require 'abstract_unit' + +module ActionDispatch + class UploadedFileTest < ActiveSupport::TestCase + def test_original_filename + uf = Http::UploadedFile.new(:filename => 'foo') + assert_equal 'foo', uf.original_filename + end + + def test_content_type + uf = Http::UploadedFile.new(:type => 'foo') + assert_equal 'foo', uf.content_type + end + + def test_headers + uf = Http::UploadedFile.new(:head => 'foo') + assert_equal 'foo', uf.headers + end + + def test_tempfile + uf = Http::UploadedFile.new(:tempfile => 'foo') + assert_equal 'foo', uf.tempfile + end + end +end |