This project is archived and is in readonly mode.
nested attributes test should rely on associations to verify the results on count
Reported by Subba | July 27th, 2010 @ 04:17 AM
currently nested attributes tests relying on assert_difference, assert_no_difference to verify results.
assert_difference('Ship.count', 1) do
@pirate.reload.update_attributes(:update_only_ship_attributes => { :name => 'Mayflower' })
end
as opposed to testing the actual relations.
@pirate.reload.update_attributes(:update_only_ship_attributes => { :name => 'Mayflower' })
assert_not_nil @pirate.reload.ship
assert_equal @ship, @pirate.reload.ship
this patch fixes nested attributes tests.
Comments and changes to this ticket
-
Subba July 27th, 2010 @ 04:22 AM
- Assigned user set to José Valim
-
Santiago Pastorino July 27th, 2010 @ 05:02 AM
- Importance changed from to Low
Subba can you upload it again, i'm getting errors trying to GET your file
-
Repository September 1st, 2010 @ 09:15 AM
- State changed from new to resolved
(from [9c5248f6f2a1e8c417a7afd25c818181e7ff5564]) nested attributes tests should rely on associated objects to verify results not on assert_difference [#5206 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/9c5248f6f2a1e8c417a7afd25c8181... -
Repository September 1st, 2010 @ 09:15 AM
(from [dba4efbd0e437fb3d5a58e180e0bb314d1eb6bc6]) nested attributes tests should rely on associated objects to verify results not on assert_difference [#5206 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/dba4efbd0e437fb3d5a58e180e0bb3...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 5206 nested attributes test should rely on associations to verify the results on count (from [9c5248f6f2a1e8c417a7afd25c818181e7ff5564]) nested ...
- 5206 nested attributes test should rely on associations to verify the results on count (from [dba4efbd0e437fb3d5a58e180e0bb314d1eb6bc6]) nested ...