From: David Kamholz Date: Tue, 11 Jul 2006 14:37:58 +0000 (+0000) Subject: put count back in test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6a3146aaef9dde4ff061d4300dec10ee5c23cfcd;p=dbsrgits%2FDBIx-Class-Historic.git put count back in test --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 11a21c0..992f6c0 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -12,8 +12,6 @@ use Storable; use DBIx::Class::ResultSetColumn; use base qw/DBIx::Class/; -use Data::Dumper; $Data::Dumper::Indent = 1; - __PACKAGE__->load_components(qw/AccessorGroup/); __PACKAGE__->mk_group_accessors('simple' => qw/result_source result_class/); diff --git a/t/90join_torture.t b/t/90join_torture.t index 724b701..889c968 100644 --- a/t/90join_torture.t +++ b/t/90join_torture.t @@ -7,7 +7,7 @@ use DBICTest; use Data::Dumper; my $schema = DBICTest->init_schema(); -plan tests => 17; +plan tests => 18; my @rs1a_results = $schema->resultset("Artist")->search_related('cds', {title => 'Forkful of bees'}, {order_by => 'title'}); is($rs1a_results[0]->title, 'Forkful of bees', "bare field conditions okay after search related"); @@ -24,6 +24,7 @@ cmp_ok(scalar @cds, '==', 1, "condition based on inherited join okay"); #this is wrong, should accept me.title really my $rs3 = $rs2->search_related('cds'); cmp_ok(scalar($rs3->all), '==', 27, "All cds for artist returned"); +cmp_ok($rs3->count, '==', 27, "All cds for artist returned via count"); my $rs4 = $schema->resultset("CD")->search({ 'artist.artistid' => '1' }, { join => ['tracks', 'artist'], prefetch => 'artist' }); my @rs4_results = $rs4->all;