mirror of https://github.com/rails/rails
Remove unused block local var `cli`
This commit is contained in:
parent
9b234bbdfd
commit
a0550aee11
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue