X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F10_11msaccess_common.t;h=a9e0c86b90d6795a9f866d5683f370944e0aafe0;hb=1af21646d6a7fa3947796c3204697879efc3c618;hp=49e3483794e863932a1e1e1634c0409d389463d1;hpb=3b17d9885e593f0705e1e16360b816778d71ec95;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/10_11msaccess_common.t b/t/10_11msaccess_common.t index 49e3483..a9e0c86 100644 --- a/t/10_11msaccess_common.t +++ b/t/10_11msaccess_common.t @@ -1,6 +1,7 @@ use strict; use warnings; use Test::More; +use DBIx::Class::Schema::Loader::DBI::ODBC::ACCESS (); use lib qw(t/lib); use dbixcsl_common_tests; @@ -105,7 +106,32 @@ my $tester = dbixcsl_common_tests->new( 'image' => { data_type => 'image', original => { data_type => 'longbinary' } }, 'longbinary' => { data_type => 'image', original => { data_type => 'longbinary' } }, - ($ado_dsn && (not $odbc_dsn) ? %ado_extra_types : ()) + %ado_extra_types, + }, + data_types_ddl_cb => sub { + my $ddl = shift; + { + package DBIXCSL_Test::DummySchema; + use base 'DBIx::Class::Schema'; + } + my @connect_info = $odbc_dsn ? ($odbc_dsn, $odbc_user, $odbc_password) + : ($ado_dsn, $ado_user, $ado_password); + + my $schema = DBIXCSL_Test::DummySchema->connect(@connect_info); + + my $loader = DBIx::Class::Schema::Loader::DBI::ODBC::ACCESS->new( + schema => $schema, + naming => 'current', + ); + + my $conn = $loader->_ado_connection; + + require Win32::OLE; + my $comm = Win32::OLE->new('ADODB.Command'); + + $comm->{ActiveConnection} = $conn; + $comm->{CommandText} = $ddl; + $comm->Execute; }, );