Skip to content
This repository
Browse code

adding tests for uploaded file

  • Loading branch information...
commit 1e50fae2590b5df0b053e121b48565e7e472f4e7 1 parent 9eeb24c
Aaron Patterson tenderlove authored

Showing 1 changed file with 25 additions and 0 deletions. Show diff stats Hide diff stats

  1. +25 0 actionpack/test/dispatch/uploaded_file_test.rb
25 actionpack/test/dispatch/uploaded_file_test.rb
... ... @@ -0,0 +1,25 @@
  1 +require 'abstract_unit'
  2 +
  3 +module ActionDispatch
  4 + class UploadedFileTest < ActiveSupport::TestCase
  5 + def test_original_filename
  6 + uf = Http::UploadedFile.new(:filename => 'foo')
  7 + assert_equal 'foo', uf.original_filename
  8 + end
  9 +
  10 + def test_content_type
  11 + uf = Http::UploadedFile.new(:type => 'foo')
  12 + assert_equal 'foo', uf.content_type
  13 + end
  14 +
  15 + def test_headers
  16 + uf = Http::UploadedFile.new(:head => 'foo')
  17 + assert_equal 'foo', uf.headers
  18 + end
  19 +
  20 + def test_tempfile
  21 + uf = Http::UploadedFile.new(:tempfile => 'foo')
  22 + assert_equal 'foo', uf.tempfile
  23 + end
  24 + end
  25 +end

0 comments on commit 1e50fae

Please sign in to comment.
Something went wrong with that request. Please try again.