diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index b92b05a7d5..98808e658a 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -2499,7 +2499,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase test "first_or_initialize adds the record to the association" do firm = Firm.create! name: "omg" - client = firm.clients_of_firm.where(name: "lol").first_or_initialize do |cli| + client = firm.clients_of_firm.where(name: "lol").first_or_initialize do assert_deprecated do assert_equal 0, Client.count end @@ -2510,7 +2510,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase test "first_or_create adds the record to the association" do firm = Firm.create! name: "omg" firm.clients_of_firm.load_target - client = firm.clients_of_firm.where(name: "lol").first_or_create do |cli| + client = firm.clients_of_firm.where(name: "lol").first_or_create do assert_deprecated do assert_equal 0, Client.count end @@ -2522,7 +2522,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase test "first_or_create! adds the record to the association" do firm = Firm.create! name: "omg" firm.clients_of_firm.load_target - client = firm.clients_of_firm.where(name: "lol").first_or_create! do |cli| + client = firm.clients_of_firm.where(name: "lol").first_or_create! do assert_deprecated do assert_equal 0, Client.count end