aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-06-08 02:13:52 -0700
committerXavier Noria <fxn@hashref.com>2011-06-08 02:13:52 -0700
commit8c1762f11e4c2b32a0aff6cbda27f359d8c9d31c (patch)
treed4547d832a125ef0b7ad1420c7c51f1a7dccfd95 /activerecord
parent47ac896936463d7040ccda03276451a7d0a8f08e (diff)
parente58ee1dcccd86573134c617997c38f8be63fe577 (diff)
downloadrails-8c1762f11e4c2b32a0aff6cbda27f359d8c9d31c.tar.gz
rails-8c1762f11e4c2b32a0aff6cbda27f359d8c9d31c.tar.bz2
rails-8c1762f11e4c2b32a0aff6cbda27f359d8c9d31c.zip
Merge pull request #1550 from rsim/fix_test_has_many_with_pluralize_table_names_false
Do not hardcode :id as it was ignored by mass assignment filter
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/associations/join_model_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb
index f22a91be2d..4ce8b85098 100644
--- a/activerecord/test/cases/associations/join_model_test.rb
+++ b/activerecord/test/cases/associations/join_model_test.rb
@@ -722,8 +722,8 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase
end
def test_has_many_with_pluralize_table_names_false
- engine = Engine.create!(:car_id => 1)
- aircraft = Aircraft.create!(:name => "Airbus 380", :id => 1)
+ aircraft = Aircraft.create!(:name => "Airbus 380")
+ engine = Engine.create!(:car_id => aircraft.id)
assert_equal aircraft.engines, [engine]
end