X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F104view.t;h=3efdcf1074c83c169d69f2f5da25ca71acdfc2dc;hb=951b75814d2bd16a3f684145a7caf7777bc9abf4;hp=f800af45fe89f99c4c48373e8a90c37f074d6339;hpb=bccd177fabb721d4edf637c0b5024737b6705edb;p=dbsrgits%2FDBIx-Class.git diff --git a/t/104view.t b/t/104view.t index f800af4..3efdcf1 100644 --- a/t/104view.t +++ b/t/104view.t @@ -8,12 +8,21 @@ use DBICTest; my $schema = DBICTest->init_schema(); -plan tests => 1; +plan tests => 2; -my $cds_rs = $schema->resultset('CD')->search( { year => 2000 }); +## Real view +my $cds_rs_2000 = $schema->resultset('CD')->search( { year => 2000 }); my $year2kcds_rs = $schema->resultset('Year2000CDs'); -is($cds_rs->count, $year2kcds_rs->count, 'View Year2000CDs sees all CDs in year 2000'); +is($cds_rs_2000->count, $year2kcds_rs->count, 'View Year2000CDs sees all CDs in year 2000'); + + +## Virtual view +my $cds_rs_1999 = $schema->resultset('CD')->search( { year => 1999 }); +my $year1999cds_rs = $schema->resultset('Year1999CDs'); + +is($cds_rs_1999->count, $year1999cds_rs->count, 'View Year1999CDs sees all CDs in year 1999'); +