@@ -19,7 +19,8 @@ def self.up
19
19
"bigint_serial_should_be_integer bigint default nextval('seq_pk_customers')" ,
20
20
"integer_serial_should_be_integer integer default nextval('seq_pk_customers')" ,
21
21
"varchar_should_be_string varchar(2)" ,
22
- "timestamp_should_be_datetime timestamp" ,
22
+ "timestamp_should_be_timestamp timestamp" ,
23
+ "timestamptz_should_be_timestamptz timestamptz" ,
23
24
"bytea_should_be_binary bytea" ,
24
25
"double_precision_should_be_float double precision" ,
25
26
"real_should_be_float real" ,
@@ -69,8 +70,14 @@ def test_varchar_should_be_mapped_to_string
69
70
assert_instance_of ActiveModel ::Type ::String , column_type ( "varchar_should_be_string" )
70
71
end
71
72
72
- def test_timestamp_should_be_mapped_to_datetime
73
- assert_instance_of OID ::DateTime , column_type ( "timestamp_should_be_datetime" )
73
+ def test_timestamp_should_be_mapped_to_timestamp
74
+ assert_kind_of OID ::DateTime , column_type ( "timestamp_should_be_timestamp" )
75
+ assert_instance_of OID ::Timestamp , column_type ( "timestamp_should_be_timestamp" )
76
+ end
77
+
78
+ def test_timestamptz_should_be_mapped_to_timestamptz
79
+ assert_kind_of OID ::DateTime , column_type ( "timestamptz_should_be_timestamptz" )
80
+ assert_instance_of OID ::TimestampWithTimeZone , column_type ( "timestamptz_should_be_timestamptz" )
74
81
end
75
82
76
83
def test_bytea_should_be_mapped_to_binary
0 commit comments