X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/b47d1fbe36d5aeb9b79d6bbaab035ca448a3c3ef..62c17b022f40437c6b8544d867e5c9bb1c2cffa4:/vendor/plugins/attachment_fu/test/extra_attachment_test.rb diff --git a/vendor/plugins/attachment_fu/test/extra_attachment_test.rb b/vendor/plugins/attachment_fu/test/extra_attachment_test.rb index 15b1852..6c58554 100644 --- a/vendor/plugins/attachment_fu/test/extra_attachment_test.rb +++ b/vendor/plugins/attachment_fu/test/extra_attachment_test.rb @@ -24,6 +24,16 @@ class OrphanAttachmentTest < Test::Unit::TestCase end end + def test_should_create_file_from_merb_temp_file + assert_created do + attachment = upload_merb_file :filename => '/files/foo.txt' + assert_valid attachment + assert !attachment.db_file.new_record? if attachment.respond_to?(:db_file) + assert attachment.image? + assert !attachment.size.zero? + end + end + def test_should_create_image_from_uploaded_file_with_custom_content_type assert_created do attachment = upload_file :content_type => 'foo/bar', :filename => '/files/rails.png'