Skip to content

Commit

Permalink
adding tests for uploaded file
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Oct 7, 2010
1 parent 9eeb24c commit 1e50fae
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions 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

0 comments on commit 1e50fae

Please sign in to comment.