added a test for count() caching
[dbsrgits/DBIx-Class.git] / t / run / 23cache.tl
index 3f98204..4afd2b2 100644 (file)
@@ -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;