Add test case for autosave HasMany with accepts_nested_attributes.

It should not save the parent record when the nested attributes are
invalid.

Test case to cover #8194.
Merge pull request #13974 from laurocaetano/test_case_for_autosave_with_accepts_nested_attributes

Add test case for autosave association with nested attributes.