X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F74mssql.t;h=c0cea0cc402a46e6fcd8220705a5b9dfd551d09b;hb=6528878c9901803efb8cdd8561ae17a9d9409d2a;hp=7b4ddd3d7658ad89dda0d6ab0d976aa02d324199;hpb=526dc858fec4cfc63c8bc2de69c972fc6cbcccec;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/74mssql.t b/t/74mssql.t index 7b4ddd3..c0cea0c 100644 --- a/t/74mssql.t +++ b/t/74mssql.t @@ -9,6 +9,7 @@ BEGIN { } use Test::More; +use Test::Exception; use lib qw(t/lib); use DBICTest; @@ -17,7 +18,7 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_${_}" } qw/DSN USER PASS/}; plan skip_all => 'Set $ENV{DBICTEST_MSSQL_DSN}, _USER and _PASS to run this test' unless ($dsn); -plan tests => 6; +plan tests => 7; my $schema = DBICTest::Schema->clone; $schema->connection($dsn, $user, $pass); @@ -26,10 +27,13 @@ $schema->connection($dsn, $user, $pass); $schema->storage->ensure_connected; $schema->storage->_dbh->disconnect; -my $dbh = $schema->storage->dbh; - isa_ok($schema->storage, 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server'); +my $dbh; +lives_ok (sub { + $dbh = $schema->storage->dbh; +}, 'reconnect works'); + $dbh->do("IF OBJECT_ID('artist', 'U') IS NOT NULL DROP TABLE artist"); $dbh->do("IF OBJECT_ID('cd', 'U') IS NOT NULL