X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F26dumper.t;h=ddb4a0058173367482ced41fb8daf834d3f49981;hb=bfa46eb523fff8ece9b37a48d17b90510f1c8c52;hp=6904fdc5a9f445268490f1b4e3a58f287b40d5de;hpb=2c0c56b73b65d32d166032b1ff348fd3892b9635;p=dbsrgits%2FDBIx-Class.git diff --git a/t/26dumper.t b/t/26dumper.t index 6904fdc..ddb4a00 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;