diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-12-03 17:54:25 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-12-03 17:54:25 +0100 |
commit | be5527b8e8fcc25946b128fe78db10d5bee2a483 (patch) | |
tree | 22bcea749969051c6a03ee69d7e47a0d877b68b4 /activerecord/test | |
parent | 7c20a8b5581f1b0054cba590542960be455a027e (diff) | |
download | rails-be5527b8e8fcc25946b128fe78db10d5bee2a483.tar.gz rails-be5527b8e8fcc25946b128fe78db10d5bee2a483.tar.bz2 rails-be5527b8e8fcc25946b128fe78db10d5bee2a483.zip |
`connection.type_to_sql` returns a `String` for unmapped types.
Closes #13146.
This fixes an error when using:
```
change_colum :table, :column, :bigint, array: true
```
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapter_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapter_test.rb b/activerecord/test/cases/adapter_test.rb index 595edc6263..34be68a97f 100644 --- a/activerecord/test/cases/adapter_test.rb +++ b/activerecord/test/cases/adapter_test.rb @@ -178,6 +178,10 @@ module ActiveRecord result = @connection.select_all "SELECT * FROM posts" assert result.is_a?(ActiveRecord::Result) end + + test "type_to_sql returns a String for unmapped types" do + assert_equal "special_db_type", @connection.type_to_sql(:special_db_type) + end end class AdapterTestWithoutTransaction < ActiveRecord::TestCase |