Skip to content

Instantly share code, notes, and snippets.

@rgo
Created May 14, 2009 00:51
Show Gist options
  • Save rgo/111405 to your computer and use it in GitHub Desktop.
Save rgo/111405 to your computer and use it in GitHub Desktop.
how to send a multipart post?
test "should create photo" do
assert_difference('Photo.count') do
post :create, :album_id => albums(:gallery_one_one).to_param, :photo => {:name => 'photo_fooooo', :description => 'bar', :image => fixture_file_upload('rails.png')}
end
assert_redirected_to admin_album_photos_path(assigns(:album))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment