When integration testing complex forms, that is forms that updates
more than one model (through as has_many), and the submodel fields contains
file uploads. The mock request generated is incorrect.
I have made a ticket (2576) describing the problem. Supplied a patch that
contains tests that demonstrates the problems and contains a fix for
the problem. See https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2576
Hope this will be committed to rails master branch.