X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F82cascade_copy.t;h=14c4762b9b9fd2c21ce5da0d222597125c0785d7;hb=fcf32d045;hp=f0c302d3ec73365f3e2a655abc45eb7248e9e9e9;hpb=c93ddd59cd34aec049de47a63012a7d519de2ad9;p=dbsrgits%2FDBIx-Class.git diff --git a/t/82cascade_copy.t b/t/82cascade_copy.t index f0c302d..14c4762 100644 --- a/t/82cascade_copy.t +++ b/t/82cascade_copy.t @@ -1,24 +1,16 @@ use strict; -use warnings; +use warnings; use Test::More; use lib qw(t/lib); use DBICTest; -my $schema = DBICTest::init_schema(); +my $schema = DBICTest->init_schema(); -plan tests => 4; my $artist = $schema->resultset('Artist')->find(1); my $artist_cds = $artist->search_related('cds'); -my $cover_band; - -{ - no warnings qw(redefine once); - local *DBICTest::Artist::result_source_instance = \&DBICTest::Schema::Artist::result_source_instance; - - $cover_band = $artist->copy; -} +my $cover_band = $artist->copy ({name => $artist->name . '_cover' }); my $cover_cds = $cover_band->search_related('cds'); cmp_ok($cover_band->id, '!=', $artist->id, 'ok got new column id...'); @@ -31,3 +23,4 @@ cmp_ok($cover_band->search_related('twokeys')->count, '>', 0, 'duplicated multiP cmp_ok($cover_cds->search_related('tags')->count, '==', $artist_cds->search_related('tags')->count , 'duplicated count ok'); +done_testing;