Problems using nested objects in a test

It's up to you to create the sort of hash that would have been submitted normally. If the way your controller and test data work means that you have to spell that our at :character => {:nationality => characters(:user_controller_test).something.something ...} then you've just got to get on with it

Fred

So there's no method to create the hash the way it'd be accepted? Sounds like a helper method... :slight_smile:

Well given an activerecord object then foo.attributes is a hash of attributes, however this cannot anticipate how you're handling things in the controller (eg nationality/nationality_id and the thing you're doing with dates)

Fred