X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F105view_deps.t;h=d056e9dc64e8535dd0ba4d3e573b7d0f3e82d0b8;hb=68de943862f06cabd397d2e74d12cd9cdc999779;hp=d53dc79981ba2ac8e219920dc74eaeea82b308dc;hpb=c418c5cc5d3e8b3b456ea0daf7569f4ac3ef7cd4;p=dbsrgits%2FDBIx-Class.git diff --git a/t/105view_deps.t b/t/105view_deps.t index d53dc79..d056e9d 100644 --- a/t/105view_deps.t +++ b/t/105view_deps.t @@ -5,14 +5,20 @@ use warnings; use Test::More; use Test::Exception; +use Test::Warn; use lib qw(t/lib); use ViewDeps; use ViewDepsBad; BEGIN { - use_ok('DBIx::Class::ResultSource::View'); + require DBIx::Class; + plan skip_all => 'Test needs ' . + DBIx::Class::Optional::Dependencies->req_missing_for('deploy') + unless DBIx::Class::Optional::Dependencies->req_ok_for('deploy'); } +use_ok('DBIx::Class::ResultSource::View'); + #################### SANITY my $view = DBIx::Class::ResultSource::View->new; @@ -65,7 +71,9 @@ ok( $schema2, 'Connected to ViewDepsBad schema OK' ); #################### DEPLOY2 -$schema2->deploy( { add_drop_table => 1 } ); +warnings_exist { $schema2->deploy( { add_drop_table => 1 } ); } +[qr/no such table: main.aba_name_artists/], + "Deploying the bad schema produces a warning: aba_name_artists was not created."; #################### DOES ORDERING WORK 2?