X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02noautodeploy.t;h=6e70f313fa0fd9b1a06382755c9faf394f6b25fd;hb=44c7ee79567a790b75999b3ed01a826614fcde5c;hp=8ceb5fdd54ebac3665135820fb93856d77f29d8a;hpb=453d86de3be7132569eb980644f178c50bc96d59;p=dbsrgits%2FDBIx-Class-Journal.git diff --git a/t/02noautodeploy.t b/t/02noautodeploy.t index 8ceb5fd..6e70f31 100644 --- a/t/02noautodeploy.t +++ b/t/02noautodeploy.t @@ -1,16 +1,15 @@ use strict; -use warnings; +use warnings; use Test::More; use lib qw(t/lib); use DBICTest; -use Data::Dumper; BEGIN { - eval "use DBD::SQLite"; + eval "use DBD::SQLite; use SQL::Translator"; plan $@ - ? ( skip_all => 'needs DBD::SQLite for testing' ) - : ( 'no_plan' ); + ? ( skip_all => 'needs DBD::SQLite and SQL::Translator for testing' ) + : ( tests => 8 ); } my $schema = DBICTest->init_schema(no_populate => 1, no_deploy => 1); @@ -20,17 +19,17 @@ isa_ok($schema->_journal_schema, 'DBIx::Class::Schema::Journal::DB', 'Actually h 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 { - $schema->_journal_schema->resultset('ArtistAuditLog')->count; +my $count = eval { + $schema->_journal_schema->resultset('ChangeLog')->count; }; my $e = $@; is( $count, undef, "no count" ); -like( $e, qr/table.*artist_audit_log/i, "missing table error" ); +like( $e, qr/table.*changelog/, "missing table error" ); $schema->journal_schema_deploy(); -$count = eval { $schema->_journal_schema->resultset('ArtistAuditLog')->count }; +$count = eval { $schema->_journal_schema->resultset('ChangeLog')->count }; is( $@, '', "no error" ); is( $count, 0, "count is 0" );