mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Just look at sql_type when testing that the correct database-specific type was used
Signed-off-by: Michael Koziarski <michael@koziarski.com>
This commit is contained in:
parent
e06878c22b
commit
ce3c76de7c
1 changed files with 1 additions and 4 deletions
|
@ -442,10 +442,7 @@ if ActiveRecord::Base.connection.supports_migrations?
|
|||
|
||||
ActiveRecord::Migration.add_column :people, :intelligence_quotient, :tinyint
|
||||
Person.reset_column_information
|
||||
Person.create :intelligence_quotient => 300
|
||||
jonnyg = Person.find(:first)
|
||||
assert_equal 127, jonnyg.intelligence_quotient
|
||||
jonnyg.destroy
|
||||
assert_match /tinyint/, Person.columns_hash['intelligence_quotient'].sql_type
|
||||
ensure
|
||||
ActiveRecord::Migration.remove_column :people, :intelligence_quotient rescue nil
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue