X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02-instantiation.t;h=156bb246dc9023794ff5387844c308cf76b0357b;hb=8b2c6f39484dd3dd94e1b7ed5ebe63f2ba98d0fb;hp=ebc10e5136afebebe14d6c6bee692c0a2212c79c;hpb=a41a04e5fddd753e6daf9430016df40a1cab93e2;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/t/02-instantiation.t b/t/02-instantiation.t index ebc10e5..156bb24 100644 --- a/t/02-instantiation.t +++ b/t/02-instantiation.t @@ -6,7 +6,6 @@ use File::Path 'remove_tree'; use lib 't/lib'; use DBICDHTest; -use DBICTest; use DBIx::Class::DeploymentHandler; my $db = 'dbi:SQLite:db.db'; my @connection = ($db, '', '', { ignore_version => 1 }); @@ -22,7 +21,7 @@ VERSION1: { upgrade_directory => $sql_dir, schema => $s, databases => 'SQLite', - sqltargs => { add_drop_table => 0 }, + sqltargs => { add_drop_table => 0 }, }); ok($handler, 'DBIx::Class::DeploymentHandler w/1.0 instantiates correctly'); @@ -37,6 +36,9 @@ VERSION1: { }) } 'schema not deployed'; $handler->install; + dies_ok { + $handler->install; + } 'cannot install twice'; lives_ok { $s->resultset('Foo')->create({ bar => 'frew', @@ -59,6 +61,7 @@ VERSION2: { $version = $s->schema_version(); $handler->prepare_install(); $handler->prepare_upgrade('1.0', $version); + $handler->prepare_upgrade($version, '1.0'); #ok(-e 't/sql/DBICVersion-Schema-schema-2.0-SQLite.sql', 'DDL for 2.0 got created successfully'); #ok(-e 't/sql/DBICVersion-Schema-diff-1.0-2.0-SQLite.sql', 'DDL for migration from 1.0 to 2.0 got created successfully'); dies_ok {