Hi All. how can i write test cases for video and image uploads. I am using attachment_fu plugin. Thanks Arpit
use this: http://api.rubyonrails.org/classes/ActionController/TestUploadedFile.html
like: file = ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path + '/files/test.gif', 'image/gif')
post(:uploader, :file => get_file)
and then test if entries in your db are as expected and the file exists in destination path