[Bast-commits] r4665 - in trunk/DBIx-Class-Journal/t: . lib/DBICTest

nothingmuch at dev.catalyst.perl.org nothingmuch at dev.catalyst.perl.org
Tue Jul 29 18:54:05 BST 2008


Author: nothingmuch
Date: 2008-07-29 18:54:05 +0100 (Tue, 29 Jul 2008)
New Revision: 4665

Modified:
   trunk/DBIx-Class-Journal/t/01test.t
   trunk/DBIx-Class-Journal/t/lib/DBICTest/Schema.pm
Log:
journal_no_auto_deploy

Modified: trunk/DBIx-Class-Journal/t/01test.t
===================================================================
--- trunk/DBIx-Class-Journal/t/01test.t	2008-07-29 17:53:11 UTC (rev 4664)
+++ trunk/DBIx-Class-Journal/t/01test.t	2008-07-29 17:54:05 UTC (rev 4665)
@@ -10,7 +10,7 @@
     eval "use DBD::SQLite";
     plan $@
         ? ( skip_all => 'needs DBD::SQLite for testing' )
-        : ( tests => 12 );
+        : ( tests => 14 );
 }
 
 my $schema = DBICTest->init_schema(no_populate => 1);
@@ -20,6 +20,18 @@
 isa_ok($schema->_journal_schema->source('CDAuditHistory'), 'DBIx::Class::ResultSource', 'CDAuditHistory source exists');
 isa_ok($schema->_journal_schema->source('ArtistAuditLog'), 'DBIx::Class::ResultSource', 'ArtistAuditLog source exists');
 
+{
+	my $count = eval { 
+		warn $schema->_journal_schema->resultset('ArtistAuditLog')->count;
+   	};
+	my $e = $@;
+
+	is( $count, undef, "no count" );
+	like( $e, qr/table.*artist_audit_log/i, "missing table error" );
+}
+
+$schema->journal_schema_deploy();
+
 my $artist;
 my $new_cd = $schema->txn_do( sub {
     $artist = $schema->resultset('Artist')->create({

Modified: trunk/DBIx-Class-Journal/t/lib/DBICTest/Schema.pm
===================================================================
--- trunk/DBIx-Class-Journal/t/lib/DBICTest/Schema.pm	2008-07-29 17:53:11 UTC (rev 4664)
+++ trunk/DBIx-Class-Journal/t/lib/DBICTest/Schema.pm	2008-07-29 17:54:05 UTC (rev 4665)
@@ -5,8 +5,9 @@
 
 __PACKAGE__->load_components(qw/+DBIx::Class::Schema::Journal/);
 
+__PACKAGE__->journal_no_automatic_deploy(1);
+
 __PACKAGE__->journal_connection(['dbi:SQLite:t/var/Audit.db']);
-__PACKAGE__->journal_user(['DBICTest::Schema::Artist', {'foreign.artistid' => 'self.user_id'}]);
 
 no warnings qw/qw/;
 DBICTest::Schema->load_classes(




More information about the Bast-commits mailing list