diff options
author | Takehiro Adachi <takehiro0740@gmail.com> | 2013-02-19 21:38:25 +0900 |
---|---|---|
committer | Takehiro Adachi <takehiro0740@gmail.com> | 2013-02-19 21:38:25 +0900 |
commit | 679777849b34811d137f556126537e37a6949bfe (patch) | |
tree | 78ddaff0add3e73a969e8a1968952f3ee7ade5ef /activerecord/test | |
parent | b04c81d367323849a0019f6964639efaad0e9df0 (diff) | |
download | rails-679777849b34811d137f556126537e37a6949bfe.tar.gz rails-679777849b34811d137f556126537e37a6949bfe.tar.bz2 rails-679777849b34811d137f556126537e37a6949bfe.zip |
delete duplicated tests in AR base_test.rb
These are duplicated with the tests which are in relations_test.rb
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 286e0be105..fbc66540d6 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -327,29 +327,6 @@ class BasicsTest < ActiveRecord::TestCase assert !cbs[1].frickinawesome end - def test_first_or_create - parrot = Bird.first_or_create(:color => 'green', :name => 'parrot') - assert parrot.persisted? - the_same_parrot = Bird.first_or_create(:color => 'yellow', :name => 'macaw') - assert_equal parrot, the_same_parrot - end - - def test_first_or_create_bang - assert_raises(ActiveRecord::RecordInvalid) { Bird.first_or_create! } - parrot = Bird.first_or_create!(:color => 'green', :name => 'parrot') - assert parrot.persisted? - the_same_parrot = Bird.first_or_create!(:color => 'yellow', :name => 'macaw') - assert_equal parrot, the_same_parrot - end - - def test_first_or_initialize - parrot = Bird.first_or_initialize(:color => 'green', :name => 'parrot') - assert_kind_of Bird, parrot - assert !parrot.persisted? - assert parrot.new_record? - assert parrot.valid? - end - def test_load topics = Topic.all.merge!(:order => 'id').to_a assert_equal(4, topics.size) |