Skip to content
This repository
Browse code

adding tests for uploaded file

  • Loading branch information...
commit f9734f2b0f5326c399d1c1cccba8b6d8e7d9bdd4 1 parent 28bb188
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 f9734f2

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