I''ve done one.
def test_simple_import
process ''process_upload'', ''file'' =>
File.open(File.dirname(__FILE__) + ''/simple.xml'',
''r'')
assert_redirected_to :action => ''index''
end
Chris
On Sat, 18 Dec 2004 23:58:33 -0800, evan
<anarchogeek-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I''ve been trying to figure this one out. How do i write functional
> tests for controllers/actions which have file uploads.
>
> I''ve tried passing in the file path, and a file object, but that
didn''t work.
>
> Has anybody written functional tests for file uploads?
>
> thanks,
> rabble
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>