Remove unused block local var `cli`

This commit is contained in:
Ryuta Kamizono 2019-10-04 15:53:13 +09:00
parent 9b234bbdfd
commit a0550aee11
1 changed files with 3 additions and 3 deletions

View File

@ -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