aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2014-12-31 09:15:36 -0700
committerSean Griffin <sean@seantheprogrammer.com>2014-12-31 09:15:36 -0700
commit4d7c74d2936d7c571ca8c5dd24ad5a39c02accb4 (patch)
treed03ac4caf08d2922ab2d22725bad08236affd694
parent5ac4680cd3868af7b1d3feda3a2a819bc6deac26 (diff)
parent42b45b1980066fdc565aa2d3900da74bf97bc333 (diff)
downloadrails-4d7c74d2936d7c571ca8c5dd24ad5a39c02accb4.tar.gz
rails-4d7c74d2936d7c571ca8c5dd24ad5a39c02accb4.tar.bz2
rails-4d7c74d2936d7c571ca8c5dd24ad5a39c02accb4.zip
Merge pull request #18272 from kamipo/fix_warning_assigned_but_unused_variable
Fix warning: assigned but unused variable - post
-rw-r--r--activerecord/test/cases/associations/has_one_associations_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/has_one_associations_test.rb b/activerecord/test/cases/associations/has_one_associations_test.rb
index 15b37ad709..9b6757e256 100644
--- a/activerecord/test/cases/associations/has_one_associations_test.rb
+++ b/activerecord/test/cases/associations/has_one_associations_test.rb
@@ -577,7 +577,7 @@ class HasOneAssociationsTest < ActiveRecord::TestCase
def test_has_one_loading_for_new_record
post = Post.create!(author_id: 42, title: 'foo', body: 'bar')
author = Author.new(id: 42)
- assert author.post
+ assert_equal post, author.post
end
def test_has_one_relationship_cannot_have_a_counter_cache