aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_one_associations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/associations/has_one_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/has_one_associations_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/has_one_associations_test.rb b/activerecord/test/cases/associations/has_one_associations_test.rb
index a032f130ca..bf574f6637 100644
--- a/activerecord/test/cases/associations/has_one_associations_test.rb
+++ b/activerecord/test/cases/associations/has_one_associations_test.rb
@@ -23,10 +23,10 @@ class HasOneAssociationsTest < ActiveRecord::TestCase
def test_has_one
firm = companies(:first_firm)
+ first_account = Account.find(1)
assert_sql(/LIMIT|ROWNUM <=|FETCH FIRST/) do
- account = firm.account
- assert_equal account, Account.find(1)
- assert_equal Account.find(1).credit_limit, account.credit_limit
+ assert_equal first_account, firm.account
+ assert_equal first_account.credit_limit, firm.account.credit_limit
end
end