Created
November 11, 2011 11:06
-
-
Save mlangenberg/1357752 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_find_or_initialize_updates_collection_size_only_once | |
number_of_clients = companies(:first_firm).clients_of_firm.size | |
client = companies(:first_firm).clients_of_firm.find_or_initialize_by_name("name" => "Another Client") | |
client.save | |
assert_equal number_of_clients + 1, companies(:first_firm).clients_of_firm.size | |
end |
Author
mlangenberg
commented
Nov 11, 2011
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment