diff options
author | Raimonds Simanovskis <raimonds.simanovskis@gmail.com> | 2011-06-08 11:56:23 +0300 |
---|---|---|
committer | Raimonds Simanovskis <raimonds.simanovskis@gmail.com> | 2011-06-08 11:56:23 +0300 |
commit | e58ee1dcccd86573134c617997c38f8be63fe577 (patch) | |
tree | d4547d832a125ef0b7ad1420c7c51f1a7dccfd95 /activerecord | |
parent | 47ac896936463d7040ccda03276451a7d0a8f08e (diff) | |
download | rails-e58ee1dcccd86573134c617997c38f8be63fe577.tar.gz rails-e58ee1dcccd86573134c617997c38f8be63fe577.tar.bz2 rails-e58ee1dcccd86573134c617997c38f8be63fe577.zip |
Do not hardcode :id as it was ignored by mass assignment filter
As a result test was failing on Oracle where ids are assigned by default from 1000
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/associations/join_model_test.rb | 4 |
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 |