aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/bytea_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-11-07 10:55:45 +0100
committerYves Senn <yves.senn@gmail.com>2014-11-07 10:55:45 +0100
commit92534179096b9b4838bbaee343bba1127095f5e6 (patch)
treea398083ade185a83a4862ef7931a4792e4bc10cf /activerecord/test/cases/adapters/postgresql/bytea_test.rb
parent48e3edf9ad724426a3694ca6b589da0d5e0de1ee (diff)
downloadrails-92534179096b9b4838bbaee343bba1127095f5e6.tar.gz
rails-92534179096b9b4838bbaee343bba1127095f5e6.tar.bz2
rails-92534179096b9b4838bbaee343bba1127095f5e6.zip
pg tests, get rid of `sql_types_test.rb`.
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/bytea_test.rb')
-rw-r--r--activerecord/test/cases/adapters/postgresql/bytea_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/bytea_test.rb b/activerecord/test/cases/adapters/postgresql/bytea_test.rb
index ec4aebf03a..aeebec034d 100644
--- a/activerecord/test/cases/adapters/postgresql/bytea_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/bytea_test.rb
@@ -28,6 +28,13 @@ class PostgresqlByteaTest < ActiveRecord::TestCase
assert_equal :binary, @column.type
end
+ def test_binary_columns_are_limitless_the_upper_limit_is_one_GB
+ assert_equal 'bytea', @connection.type_to_sql(:binary, 100_000)
+ assert_raise ActiveRecord::ActiveRecordError do
+ @connection.type_to_sql :binary, 4294967295
+ end
+ end
+
def test_type_cast_binary_converts_the_encoding
assert @column