X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F53delete_related.t;h=4df86981c87b5d697f66fb366e896cd143e8f0dd;hb=0ab4d12d64c3711ad2f428bff1b7a363f03f1b83;hp=f19356614e3f515bd6583c13740c98b0d93ef1c7;hpb=c6ce6ec6a7ffb98065ccf6e71fc0420e3a71d982;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/53delete_related.t b/t/53delete_related.t index f193566..4df8698 100644 --- a/t/53delete_related.t +++ b/t/53delete_related.t @@ -3,11 +3,10 @@ use strict; use warnings; use lib qw(t/lib); use DBICTest; -use DBICTest::BasicRels; plan tests => 7; -my $schema = DBICTest->schema; +my $schema = DBICTest->init_schema(); my $total_cds = $schema->resultset('CD')->count; cmp_ok($total_cds, '>', 0, 'need cd records'); @@ -17,7 +16,7 @@ my $artist_cds = $artist->cds->count; cmp_ok($artist_cds, '<', $total_cds, 'need more cds than just related cds'); ok($artist->delete_related('cds')); -cmp_ok($schema->resultset('CD')->count, '==', ($total_cds - $artist_cds), 'too many cds were deleted'); +cmp_ok($schema->resultset('CD')->count, '==', ($total_cds - $artist_cds), 'wrong number of cds were deleted'); $total_cds -= $artist_cds; @@ -27,4 +26,5 @@ my $artist2_cds = $artist2->search_related('cds')->count; cmp_ok($artist2_cds, '<', $total_cds, 'need more cds than related cds'); ok($artist2->delete_related('cds', {title => {like => '%'}})); -cmp_ok($schema->resultset('CD')->count, '==', ($total_cds - $artist2_cds), 'too many cds were deleted'); +cmp_ok($schema->resultset('CD')->count, '==', ($total_cds - $artist2_cds), 'wrong number of cds were deleted'); +