aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-12-12 10:43:36 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2013-12-12 10:47:07 -0800
commitda3891c898fd79ab28dad3ce4c9e52d876c9e4e9 (patch)
tree8f9faa6e44697f0776ab29b26110127110ec991d /activerecord/test/cases
parent6e2b734f56e4c789763b9a8e3922272a004a325f (diff)
downloadrails-da3891c898fd79ab28dad3ce4c9e52d876c9e4e9.tar.gz
rails-da3891c898fd79ab28dad3ce4c9e52d876c9e4e9.tar.bz2
rails-da3891c898fd79ab28dad3ce4c9e52d876c9e4e9.zip
make sure cached table name is a string. fixes #12582
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb7
1 files changed, 7 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 be928ec8ee..8aee7ff40e 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
@@ -570,6 +570,13 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase
assert !developer.special_projects.include?(other_project)
end
+ def test_symbol_join_table
+ developer = Developer.first
+ sp = developer.sym_special_projects.create("name" => "omg")
+ developer.reload
+ assert_includes developer.sym_special_projects, sp
+ end
+
def test_update_attributes_after_push_without_duplicate_join_table_rows
developer = Developer.new("name" => "Kano")
project = SpecialProject.create("name" => "Special Project")