diff options
author | kenjiszk <kenji.suzuki.1984@gmail.com> | 2016-05-21 13:32:28 +0000 |
---|---|---|
committer | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-09-01 22:09:01 -0400 |
commit | 15e04b4ef8726198472382204196cad713aac364 (patch) | |
tree | 7da27742a64744ba413c9ad35a26792f8c4e0d54 /activerecord/test/cases | |
parent | d8ac08f6bf545c025d7540fb680f41233bcca566 (diff) | |
download | rails-15e04b4ef8726198472382204196cad713aac364.tar.gz rails-15e04b4ef8726198472382204196cad713aac364.tar.bz2 rails-15e04b4ef8726198472382204196cad713aac364.zip |
add mysql and sqlite3 default test
[Gannon McGibbon + Kenji Suzuki]
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index d216fe16fa..f6311f9256 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -853,8 +853,7 @@ class BasicsTest < ActiveRecord::TestCase assert_equal company, Company.find(company.id) end - # TODO: extend defaults tests to other databases! - if current_adapter?(:PostgreSQLAdapter) + if current_adapter?(:PostgreSQLAdapter, :Mysql2Adapter, :SQLite3Adapter) def test_default with_timezone_config default: :local do default = Default.new @@ -866,7 +865,10 @@ class BasicsTest < ActiveRecord::TestCase # char types assert_equal "Y", default.char1 assert_equal "a varchar field", default.char2 - assert_equal "a text field", default.char3 + # Mysql text type can't have default value + unless current_adapter?(:Mysql2Adapter) + assert_equal "a text field", default.char3 + end end end end |