use lib qw(t/lib);
use dbixcsl_common_tests;
use Test::More;
+use Test::Exception;
my $dsn = $ENV{DBICTEST_SYBASE_DSN} || '';
my $user = $ENV{DBICTEST_SYBASE_USER} || '';
},
],
drop => [ qw/ sybase_loader_test1 / ],
- count => 7,
+ count => 9,
run => sub {
my ($schema, $monikers, $classes) = @_;
{
local $TODO = 'constant DEFAULT introspection';
- is $rsrc->column_info('charfield')->{default},
+ is $rsrc->column_info('charfield')->{default_value},
'foo',
'constant DEFAULT is correct';
}
or diag "Data type is: ",
$rsrc->column_info('computed_dt')->{data_type}
;
+
+ {
+ local $TODO = 'default_value for computed columns';
+
+ my $computed_dt_default =
+ $rsrc->column_info('computed_dt')->{default_value};
+
+ ok ((ref $computed_dt_default eq 'SCALAR'),
+ 'default_value for computed column is a scalar ref')
+# or diag "default_value is: ", $computed_dt_default
+ ;
+
+ eval { is $$computed_dt_default,
+ 'getdate()',
+ 'default_value for computed column is correct' };
+ }
},
},
);