[Bast-commits] r9267 - in DBIx-Class-Journal/1.000/trunk: lib/DBIx/Class/Schema t

oliver at dev.catalyst.perl.org oliver at dev.catalyst.perl.org
Wed Apr 28 21:08:52 GMT 2010


Author: oliver
Date: 2010-04-28 22:08:52 +0100 (Wed, 28 Apr 2010)
New Revision: 9267

Modified:
   DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Schema/Journal.pm
   DBIx-Class-Journal/1.000/trunk/t/03populate.t
Log:
found a bug with use of id not $pk - thanks tests!!

Modified: DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Schema/Journal.pm
===================================================================
--- DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Schema/Journal.pm	2010-04-28 20:57:14 UTC (rev 9266)
+++ DBIx-Class-Journal/1.000/trunk/lib/DBIx/Class/Schema/Journal.pm	2010-04-28 21:08:52 UTC (rev 9267)
@@ -181,7 +181,7 @@
 
                 # create the audit log entries for the rows in this page
                 $log_rs->populate([
-                    map {{ create_id => $log_ids[$_], id => $x[$_]->{$pk} }} (0 .. $#x)
+                    map {{ create_id => $log_ids[$_], $pk => $x[$_]->{$pk} }} (0 .. $#x)
                 ]);
 
                 # now populate the audit history

Modified: DBIx-Class-Journal/1.000/trunk/t/03populate.t
===================================================================
--- DBIx-Class-Journal/1.000/trunk/t/03populate.t	2010-04-28 20:57:14 UTC (rev 9266)
+++ DBIx-Class-Journal/1.000/trunk/t/03populate.t	2010-04-28 21:08:52 UTC (rev 9267)
@@ -6,7 +6,7 @@
     eval "use DBD::SQLite; use SQL::Translator";
     plan $@
         ? ( skip_all => 'needs DBD::SQLite and SQL::Translator for testing' )
-        : ( tests => 21 );
+        : ( tests => 17 );
 }
 
 use lib qw(t/lib);
@@ -14,9 +14,9 @@
 
 # connect to db and deploy only the original db schema, not journal schema
 my $schema = DBICTest->init_schema(no_populate => 1, no_deploy => 1);
-$schema->deploy;
 
 ok($schema, 'Created a Schema');
+$schema->deploy;
 
 # check we have no journal
 my $count = eval {




More information about the Bast-commits mailing list