aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations_join_model_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/associations_join_model_test.rb')
-rw-r--r--activerecord/test/associations_join_model_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/test/associations_join_model_test.rb b/activerecord/test/associations_join_model_test.rb
index a011a0fae8..61488900d6 100644
--- a/activerecord/test/associations_join_model_test.rb
+++ b/activerecord/test/associations_join_model_test.rb
@@ -68,5 +68,9 @@ class AssociationsJoinModelTest < Test::Unit::TestCase
assert_equal categories(:general), authors(:david).categories.find_by_name('General')
# assert_equal nil, authors(:david).categories.find_by_name('Technology')
end
-
+
+ def test_has_many_going_through_join_model_with_custom_foreign_key
+ assert_equal [], posts(:thinking).authors
+ assert_equal [authors(:mary)], posts(:authorless).authors
+ end
end