diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-20 17:33:26 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-20 19:47:15 -0800 |
commit | 207f266ccaaa9cd04cd2a7513ae5598c4358b510 (patch) | |
tree | e197d33af7d701d183ed326f7d1c63b915b26fc7 /activerecord/test/cases/associations | |
parent | 099a210c837daae692154add3b9da0a207825d35 (diff) | |
download | rails-207f266ccaaa9cd04cd2a7513ae5598c4358b510.tar.gz rails-207f266ccaaa9cd04cd2a7513ae5598c4358b510.tar.bz2 rails-207f266ccaaa9cd04cd2a7513ae5598c4358b510.zip |
define_attr_method must serialize nil correctly
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/join_model_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb index 0a57c7883f..58542bc939 100644 --- a/activerecord/test/cases/associations/join_model_test.rb +++ b/activerecord/test/cases/associations/join_model_test.rb @@ -512,6 +512,10 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase assert_nothing_raised { vertices(:vertex_1).sinks << vertices(:vertex_5) } end + def test_add_to_join_table_with_no_id + assert_nothing_raised { vertices(:vertex_1).sinks << vertices(:vertex_5) } + end + def test_has_many_through_collection_size_doesnt_load_target_if_not_loaded author = authors(:david) assert_equal 10, author.comments.size |