aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-07-27 23:23:05 -0300
committerGitHub <noreply@github.com>2016-07-27 23:23:05 -0300
commit70ec7feaecab2d3f4dcb84ef2373a80d427aa336 (patch)
tree1f589c86d0706cb37d95a2d56a51758cf2244266 /activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
parentea1dcbbc9965f82361f45d5b098207de738d7bb9 (diff)
parentb7d229d1fabbd271fd37e9f4eac316a44d690842 (diff)
downloadrails-70ec7feaecab2d3f4dcb84ef2373a80d427aa336.tar.gz
rails-70ec7feaecab2d3f4dcb84ef2373a80d427aa336.tar.bz2
rails-70ec7feaecab2d3f4dcb84ef2373a80d427aa336.zip
Merge pull request #25767 from kamipo/association_name_is_the_same_as_join_table_name
Correctly return `associated_table` when `associated_with?` is true
Diffstat (limited to 'activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
index e27f16b6e4..a959f3c06a 100644
--- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
@@ -19,6 +19,7 @@ require 'models/professor'
require 'models/treasure'
require 'models/price_estimate'
require 'models/club'
+require 'models/user'
require 'models/member'
require 'models/membership'
require 'models/sponsor'
@@ -995,4 +996,9 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase
Project.first.developers_required_by_default.create!(name: "Sean", salary: 50000)
end
end
+
+ def test_association_name_is_the_same_as_join_table_name
+ user = User.create!
+ assert_nothing_raised { user.jobs_pool.clear }
+ end
end