diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-03-22 19:30:24 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-03-22 19:30:24 -0700 |
commit | bc8ebefe9825dbff2cffa29ff015a1e7a31f9812 (patch) | |
tree | 436286dc1d634aa35531a065821c3351a6cf237f /activerecord/test/cases/adapters | |
parent | d25e4076ba2061baf7b96784c9b4df4256ce736e (diff) | |
download | rails-bc8ebefe9825dbff2cffa29ff015a1e7a31f9812.tar.gz rails-bc8ebefe9825dbff2cffa29ff015a1e7a31f9812.tar.bz2 rails-bc8ebefe9825dbff2cffa29ff015a1e7a31f9812.zip |
add uuid primary key support
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/uuid_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/uuid_test.rb b/activerecord/test/cases/adapters/postgresql/uuid_test.rb index 53002c5265..c0c0e8898c 100644 --- a/activerecord/test/cases/adapters/postgresql/uuid_test.rb +++ b/activerecord/test/cases/adapters/postgresql/uuid_test.rb @@ -35,6 +35,16 @@ class PostgresqlUUIDTest < ActiveRecord::TestCase @connection.execute 'drop table if exists pg_uuids' end + def test_id_is_uuid + assert_equal :uuid, UUID.columns_hash['id'].type + assert UUID.primary_key + end + + def test_id_has_a_default + u = UUID.create + assert_not_nil u.id + end + def test_auto_create_uuid u = UUID.create u.reload |