aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/belongs_to_associations_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-11-28 03:34:20 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-11-28 03:34:20 +0900
commite4aec40578ea0dd2944f97f1ad60cfbdf4b3a44d (patch)
treebb7151ae8ec058b96338a95405f307f1cf5513eb /activerecord/test/cases/associations/belongs_to_associations_test.rb
parentba4e68f577efc76f351d30a2914e29942b97830e (diff)
downloadrails-e4aec40578ea0dd2944f97f1ad60cfbdf4b3a44d.tar.gz
rails-e4aec40578ea0dd2944f97f1ad60cfbdf4b3a44d.tar.bz2
rails-e4aec40578ea0dd2944f97f1ad60cfbdf4b3a44d.zip
More exercise singular association query
Follow up ba4e68f577efc76f351d30a2914e29942b97830e.
Diffstat (limited to 'activerecord/test/cases/associations/belongs_to_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/belongs_to_associations_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb
index c1a335bda8..d1e4ebe86b 100644
--- a/activerecord/test/cases/associations/belongs_to_associations_test.rb
+++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb
@@ -33,10 +33,10 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
def test_belongs_to
client = Client.find(3)
+ first_firm = companies(:first_firm)
assert_sql(/LIMIT|ROWNUM <=|FETCH FIRST/) do
- firm = client.firm
- assert_not_nil firm
- assert_equal companies(:first_firm).name, firm.name
+ assert_equal first_firm, client.firm
+ assert_equal first_firm.name, client.firm.name
end
end