From: Justin Hunter Date: Thu, 30 Apr 2009 08:24:41 +0000 (+0000) Subject: branch to work on Sybase/MSSQL subtleties X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=651682ae3e04ca4f55d6915e0c8ddc7f257f8fa7;p=dbsrgits%2FDBIx-Class-Historic.git branch to work on Sybase/MSSQL subtleties --- diff --git a/t/74mssql.t b/t/74mssql.t index 92b3103..e50f32f 100644 --- a/t/74mssql.t +++ b/t/74mssql.t @@ -12,18 +12,16 @@ 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 => 5; +plan tests => 6; -my $storage_type = '::DBI::MSSQL'; -$storage_type = '::DBI::Sybase::MSSQL' if $dsn =~ /^dbi:Sybase:/; -# Add more for others in the future when they exist (ODBC? ADO? JDBC?) my $schema = DBICTest::Schema->clone; -$schema->storage_type($storage_type); $schema->connection($dsn, $user, $pass); my $dbh = $schema->storage->dbh; +isa_ok($schema->storage, 'DBIx::Class::Storage::DBI::Sybase::MSSQL'); + $dbh->do("IF OBJECT_ID('artist', 'U') IS NOT NULL DROP TABLE artist"); $dbh->do("IF OBJECT_ID('cd', 'U') IS NOT NULL