1
0
Fork 0
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:
Tarmo Tänav 2008-08-26 13:06:49 +03:00 committed by Michael Koziarski
parent e06878c22b
commit ce3c76de7c

View file

@ -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