extra TODO test for Sybase timestamp columns
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 15sybase_common.t
CommitLineData
fe67d343 1use strict;
2use lib qw(t/lib);
3use dbixcsl_common_tests;
804c115d 4use Test::More;
f9f65ded 5
fe67d343 6my $dsn = $ENV{DBICTEST_SYBASE_DSN} || '';
7my $user = $ENV{DBICTEST_SYBASE_USER} || '';
8my $password = $ENV{DBICTEST_SYBASE_PASS} || '';
9
10my $tester = dbixcsl_common_tests->new(
7cb9244f 11 vendor => 'sybase',
fe67d343 12 auto_inc_pk => 'INTEGER IDENTITY NOT NULL PRIMARY KEY',
13 dsn => $dsn,
14 user => $user,
15 password => $password,
804c115d 16 extra => {
17 create => [
18 q{
19 CREATE TABLE sybase_loader_test1 (
20 id INTEGER IDENTITY NOT NULL PRIMARY KEY,
21 ts timestamp
22 )
23 },
24 ],
25 drop => [ qw/ sybase_loader_test1 / ],
26 count => 1,
27 run => sub {
28 my ($schema, $monikers, $classes) = @_;
29
30 my $rs = $schema->resultset($monikers->{sybase_loader_test1});
31
32 {
33 local $TODO = 'timestamp introspection broken';
34
35 is $rs->result_source->column_info('ts')->{data_type},
36 'timestamp',
37 'timestamps have the correct data_type';
38 }
39 },
40 },
fe67d343 41);
42
43if( !$dsn || !$user ) {
44 $tester->skip_tests('You need to set the DBICTEST_SYBASE_DSN, _USER, and _PASS environment variables');
45}
46else {
47 $tester->run_tests();
48}