X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F746sybase.t;h=9fc87f066da817193e9e8852a470ea4ecef41371;hb=0a8a1282ce09a723d62b843fda4a221e0a6b7519;hp=2d42130521f1b76840ebfdb5adb3a393056a3759;hpb=526dc858fec4cfc63c8bc2de69c972fc6cbcccec;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/746sybase.t b/t/746sybase.t index 2d42130..9fc87f0 100644 --- a/t/746sybase.t +++ b/t/746sybase.t @@ -2,6 +2,7 @@ use strict; use warnings; use Test::More; +use Test::Exception; use lib qw(t/lib); use DBICTest; @@ -10,7 +11,7 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SYBASE_${_}" } qw/DSN USER PASS/} plan skip_all => 'Set $ENV{DBICTEST_SYBASE_DSN}, _USER and _PASS to run this test' unless ($dsn && $user); -plan tests => 12; +plan tests => 13; my $schema = DBICTest::Schema->connect($dsn, $user, $pass, {AutoCommit => 1}); @@ -20,6 +21,11 @@ $schema->storage->_dbh->disconnect; isa_ok( $schema->storage, 'DBIx::Class::Storage::DBI::Sybase' ); +my $dbh; +lives_ok (sub { + $dbh = $schema->storage->dbh; +}, 'reconnect works'); + $schema->storage->dbh_do (sub { my ($storage, $dbh) = @_; eval { $dbh->do("DROP TABLE artist") };