From 679777849b34811d137f556126537e37a6949bfe Mon Sep 17 00:00:00 2001 From: Takehiro Adachi Date: Tue, 19 Feb 2013 21:38:25 +0900 Subject: delete duplicated tests in AR base_test.rb These are duplicated with the tests which are in relations_test.rb --- activerecord/test/cases/base_test.rb | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'activerecord/test/cases/base_test.rb') 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) -- cgit v1.2.3