X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F10_02mysql_common.t;h=504e60c12e6b2e919f9f64cebfebeaae4832f6b0;hb=46e71a1b3527936e885facc87a97c586d25ecc67;hp=082ac5281cb04cf326ffd912adcfa180fb476ecd;hpb=406a97c2aab476c7a52f7c623a95f275eeb376f3;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/10_02mysql_common.t b/t/10_02mysql_common.t index 082ac52..504e60c 100644 --- a/t/10_02mysql_common.t +++ b/t/10_02mysql_common.t @@ -205,7 +205,7 @@ dbixcsl_common_tests->new( ], pre_drop_ddl => [ 'DROP VIEW mysql_loader_test2', ], drop => [ 'mysql_loader-test1', 'mysql_loader_test3', 'mysql_loader_test11', 'mysql_loader_test12' ], - count => 9 + 30 * 2, + count => 10 + 30 * 2, # regular + multi-schema * 2 run => sub { my ($monikers, $classes); ($schema, $monikers, $classes) = @_; @@ -219,8 +219,13 @@ dbixcsl_common_tests->new( 'view introspected successfully'; # test that views are marked as such - isa_ok $schema->resultset($monikers->{mysql_loader_test2})->result_source, 'DBIx::Class::ResultSource::View', - 'views have table_class set correctly'; + my $view_source = $schema->resultset($monikers->{mysql_loader_test2})->result_source; + isa_ok $view_source, 'DBIx::Class::ResultSource::View', + 'view result source'; + + like $view_source->view_definition, + qr/\A \s* select \b .* \b from \s+ `.*?` \. `mysql_loader-test1` \s* \z/imsx, + 'view defintion'; $rsrc = $schema->source('MysqlLoaderTest3');