set up v8 relbuilder, strip _ref as well as _id
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 12pg_common.t
index 8b18c58..bb03601 100644 (file)
@@ -14,12 +14,16 @@ my $tester = dbixcsl_common_tests->new(
     dsn         => $dsn,
     user        => $user,
     password    => $password,
+    loader_options  => { preserve_case => 1 },
+    quote_char  => '"',
     data_types  => {
         # http://www.postgresql.org/docs/7.4/interactive/datatype.html
         #
         # Numeric Types
        boolean     => { data_type => 'boolean' },
        bool        => { data_type => 'boolean' },
+        'bool default false'
+                    => { data_type => 'boolean', default_value => \'false' },
 
        bigint      => { data_type => 'bigint' },
        int8        => { data_type => 'bigint' },
@@ -93,8 +97,9 @@ my $tester = dbixcsl_common_tests->new(
        'time with time zone'            => { data_type => 'time with time zone' },
        'time(2) with time zone'         => { data_type => 'time with time zone', size => 2 },
        timestamp                        => { data_type => 'timestamp' },
-        'timestamp default current_timestamp'
-                                         => { data_type => 'timestamp', default_value => \'current_timestamp' },
+        'timestamp default now()'
+                                         => { data_type => 'timestamp', default_value => \'current_timestamp',
+                                              original => { default_value => \'now()' } },
        'timestamp(2)'                   => { data_type => 'timestamp', size => 2 },
        'timestamp without time zone'    => { data_type => 'timestamp' },
        'timestamp(2) without time zone' => { data_type => 'timestamp', size => 2 },
@@ -113,11 +118,11 @@ my $tester = dbixcsl_common_tests->new(
                     value VARCHAR(100)
                 )
             },
-            q{
-                COMMENT ON TABLE pg_loader_test1 IS 'The Table'
+            qq{
+                COMMENT ON TABLE pg_loader_test1 IS 'The\15\12Table'
             },
-            q{
-                COMMENT ON COLUMN pg_loader_test1.value IS 'The Column'
+            qq{
+                COMMENT ON COLUMN pg_loader_test1.value IS 'The\15\12Column'
             },
             q{
                 CREATE TABLE pg_loader_test2 (
@@ -139,10 +144,10 @@ my $tester = dbixcsl_common_tests->new(
 
             my $code = slurp $filename;
 
-            like $code, qr/^=head1 NAME\n\n^$class - The Table\n\n^=cut\n/m,
+            like $code, qr/^=head1 NAME\n\n^$class - The\nTable\n\n^=cut\n/m,
                 'table comment';
 
-            like $code, qr/^=head2 value\n\n(.+:.+\n)+\nThe Column\n\n/m,
+            like $code, qr/^=head2 value\n\n(.+:.+\n)+\nThe\nColumn\n\n/m,
                 'column comment and attrs';
 
             $class    = $classes->{pg_loader_test2};