Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

failing test case for #7845

  • Loading branch information...
commit 4d7870d61b369ba22076d967a6f022dc34a6ac72 1 parent 3395633
Yves Senn authored

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. +5 0 activerecord/test/cases/relations_test.rb
5 activerecord/test/cases/relations_test.rb
@@ -1014,6 +1014,11 @@ def test_first_or_create_with_invalid_array
1014 1014 assert_raises(ActiveRecord::RecordInvalid) { Bird.where(:color => 'green').first_or_create!([ {:name => 'parrot'}, {:pirate_id => 1} ]) }
1015 1015 end
1016 1016
  1017 + def test_first_or_create_respects_inheritance_column
  1018 + firm = Company.where(:type => 'Firm', :name => 'I do not exist').first_or_create
  1019 + assert_kind_of Firm, firm
  1020 + end
  1021 +
1017 1022 def test_first_or_initialize
1018 1023 parrot = Bird.where(:color => 'green').first_or_initialize(:name => 'parrot')
1019 1024 assert_kind_of Bird, parrot

0 comments on commit 4d7870d

Please sign in to comment.
Something went wrong with that request. Please try again.