From: Justin Guenther Date: Tue, 14 Mar 2006 23:24:08 +0000 (+0000) Subject: added a test for count() caching X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=717f349801de69ed35303c0c4189b6df09fa669c;p=dbsrgits%2FDBIx-Class-Historic.git added a test for count() caching --- diff --git a/t/run/23cache.tl b/t/run/23cache.tl index 3f98204..4afd2b2 100644 --- a/t/run/23cache.tl +++ b/t/run/23cache.tl @@ -84,7 +84,9 @@ $rs = $schema->resultset("Artist")->search( } ); { +my $artist_count_before = $schema->resultset('Artist')->count; $schema->resultset("Artist")->create({artistid=>4,name=>qq{Humoungous Hamsters}}); +is($schema->resultset('Artist')->count, $artist_count_before + 1, 'count() reflects new artist'); my $artist = $schema->resultset("Artist")->search( { artistid => 4 },{prefetch=>[qw/cds/]} )->first;