From: Justin Guenther Date: Thu, 25 May 2006 21:12:00 +0000 (+0000) Subject: Squashed an extraneous warning in 82cascade_copy.t and fixed up 26dumper.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c93ddd59cd34aec049de47a63012a7d519de2ad9;p=dbsrgits%2FDBIx-Class-Historic.git Squashed an extraneous warning in 82cascade_copy.t and fixed up 26dumper.t --- diff --git a/t/26dumper.t b/t/26dumper.t index 6904fdc..0cda954 100644 --- a/t/26dumper.t +++ b/t/26dumper.t @@ -10,27 +10,30 @@ use lib qw(t/lib); BEGIN { eval "use DBD::SQLite"; plan $ENV{DATA_DUMPER_TEST} - ? ( tests => 3 ) + ? ( tests => 2 ) : ( skip_all => 'Set $ENV{DATA_DUMPER_TEST} to run this test' ); } use_ok('DBICTest'); -use_ok('DBICTest::HelperRels'); - -my $rs = DBICTest::CD->search( - { 'artist.name' => 'We Are Goth', - 'liner_notes.notes' => 'Kill Yourself!' }, - { join => [ qw/artist liner_notes/ ] }); +my $schema = DBICTest::init_schema(); +my $rs = $schema->resultset('CD')->search({ + 'artist.name' => 'We Are Goth', + 'liner_notes.notes' => 'Kill Yourself!', +}, { + join => [ qw/artist liner_notes/ ], +}); Dumper($rs); -$rs = DBICTest::CD->search( - { 'artist.name' => 'We Are Goth', - 'liner_notes.notes' => 'Kill Yourself!' }, - { join => [ qw/artist liner_notes/ ] }); +$rs = $schema->resultset('CD')->search({ + 'artist.name' => 'We Are Goth', + 'liner_notes.notes' => 'Kill Yourself!', +}, { + join => [ qw/artist liner_notes/ ], +}); -cmp_ok( $rs + 0, '==', 1, "Single record in after death with dumper"); +cmp_ok( $rs->count(), '==', 1, "Single record in after death with dumper"); 1; diff --git a/t/82cascade_copy.t b/t/82cascade_copy.t index e5048a1..f0c302d 100644 --- a/t/82cascade_copy.t +++ b/t/82cascade_copy.t @@ -14,7 +14,7 @@ my $artist_cds = $artist->search_related('cds'); my $cover_band; { - no warnings 'redefine'; + no warnings qw(redefine once); local *DBICTest::Artist::result_source_instance = \&DBICTest::Schema::Artist::result_source_instance; $cover_band = $artist->copy;