Permalink
Browse files

Merge pull request #9315 from Takehiro-Adachi/remove-unecessary-tests…

…-from-ar-base_testrb

delete duplicated tests in AR base_test.rb
  • Loading branch information...
2 parents ff259b5 + 6797778 commit b7491249d265a1176385101e5cf418c48379de97 @steveklabnik steveklabnik committed Feb 19, 2013
Showing with 0 additions and 23 deletions.
  1. +0 −23 activerecord/test/cases/base_test.rb
@@ -327,29 +327,6 @@ def test_create_after_initialize_with_array_param
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)

0 comments on commit b749124

Please sign in to comment.