[Bast-commits] r5531 - in DBIx-Class/0.08/branches/views/t: . lib
lib/DBICTest
castaway at dev.catalyst.perl.org
castaway at dev.catalyst.perl.org
Thu Feb 19 22:12:20 GMT 2009
Author: castaway
Date: 2009-02-19 22:12:20 +0000 (Thu, 19 Feb 2009)
New Revision: 5531
Modified:
DBIx-Class/0.08/branches/views/t/104view.t
DBIx-Class/0.08/branches/views/t/lib/DBICTest/Schema.pm
DBIx-Class/0.08/branches/views/t/lib/sqlite.sql
Log:
Add tests for virtual view
Modified: DBIx-Class/0.08/branches/views/t/104view.t
===================================================================
--- DBIx-Class/0.08/branches/views/t/104view.t 2009-02-19 22:04:06 UTC (rev 5530)
+++ DBIx-Class/0.08/branches/views/t/104view.t 2009-02-19 22:12:20 UTC (rev 5531)
@@ -8,12 +8,21 @@
my $schema = DBICTest->init_schema();
-plan tests => 1;
+plan tests => 2;
+## Real view
my $cds_rs = $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');
+## Virtual view
+my $cds_rs = $schema->resultset('CD')->search( { year => 1999 });
+my $year1999cds_rs = $schema->resultset('Year1999CDs');
+is($cds_rs->count, $year1999cds_rs->count, 'View Year1999CDs sees all CDs in year 1999');
+
+
+
+
Modified: DBIx-Class/0.08/branches/views/t/lib/DBICTest/Schema.pm
===================================================================
--- DBIx-Class/0.08/branches/views/t/lib/DBICTest/Schema.pm 2009-02-19 22:04:06 UTC (rev 5530)
+++ DBIx-Class/0.08/branches/views/t/lib/DBICTest/Schema.pm 2009-02-19 22:12:20 UTC (rev 5531)
@@ -19,6 +19,7 @@
Track
Tag
Year2000CDs
+ Year1999CDs
/,
{ 'DBICTest::Schema' => [qw/
LinerNotes
Modified: DBIx-Class/0.08/branches/views/t/lib/sqlite.sql
===================================================================
--- DBIx-Class/0.08/branches/views/t/lib/sqlite.sql 2009-02-19 22:04:06 UTC (rev 5530)
+++ DBIx-Class/0.08/branches/views/t/lib/sqlite.sql 2009-02-19 22:12:20 UTC (rev 5531)
@@ -1,6 +1,6 @@
--
-- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Feb 18 22:31:31 2009
+-- Created on Thu Feb 19 22:09:32 2009
--
More information about the Bast-commits
mailing list