diff options
author | Koichi ITO <koic.ito@gmail.com> | 2017-05-31 03:39:33 +0900 |
---|---|---|
committer | Koichi ITO <koic.ito@gmail.com> | 2017-05-31 05:07:07 +0900 |
commit | c3dd37eefa61d7cc4c4725341dd09bdd9e2e2ac5 (patch) | |
tree | 87865f782c2ba544e1231b253989ac15ac622f1d /activerecord/test/cases/associations | |
parent | ac3c04513ed3e9c47c14f1d33db02b1e3b4031b8 (diff) | |
download | rails-c3dd37eefa61d7cc4c4725341dd09bdd9e2e2ac5.tar.gz rails-c3dd37eefa61d7cc4c4725341dd09bdd9e2e2ac5.tar.bz2 rails-c3dd37eefa61d7cc4c4725341dd09bdd9e2e2ac5.zip |
Remove a redundant test case of HABTM_associations_test
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb | 13 |
1 files changed, 0 insertions, 13 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 4bf1b5bcd5..f73005b3cb 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 @@ -367,19 +367,6 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase assert_equal Developer.find(1).projects.sort_by(&:id).last, proj # prove join table is updated end - def test_create_by_new_record - devel = Developer.new(name: "Marcel", salary: 75000) - devel.projects.build(name: "Make bed") - proj2 = devel.projects.build(name: "Lie in it") - assert_equal devel.projects.last, proj2 - assert !proj2.persisted? - devel.save - assert devel.persisted? - assert proj2.persisted? - assert_equal devel.projects.last, proj2 - assert_equal Developer.find_by_name("Marcel").projects.last, proj2 # prove join table is updated - end - def test_creation_respects_hash_condition # in Oracle '' is saved as null therefore need to save ' ' in not null column post = categories(:general).post_with_conditions.build(body: " ") |