general cleanup for slightly more reasonable api
[dbsrgits/DBIx-Class-DeploymentHandler.git] / t / 02-instantiation.t
index 73e92de..4be190e 100644 (file)
@@ -31,7 +31,7 @@ VERSION1: {
    ok($handler, 'DBIx::Class::DeploymentHandler w/1.0 instantiates correctly');
 
    my $version = $s->schema_version();
-   $handler->create_install_ddl();
+   $handler->prepare_install();
    ok(-e 't/sql/DBICVersion-Schema-1.0-SQLite.sql', 'DDL for 1.0 got created successfully');
 
    dies_ok {
@@ -60,8 +60,8 @@ VERSION2: {
    ok($handler, 'DBIx::Class::DeploymentHandler w/2.0 instantiates correctly');
 
    $version = $s->schema_version();
-   $handler->create_install_ddl();
-   $handler->create_update_ddl($version, '1.0');
+   $handler->prepare_install();
+   $handler->prepare_update('1.0', $version);
    ok(-e 't/sql/DBICVersion-Schema-2.0-SQLite.sql', 'DDL for 2.0 got created successfully');
    ok(-e 't/sql/DBICVersion-Schema-1.0-2.0-SQLite.sql', 'DDL for migration from 1.0 to 2.0 got created successfully');
    dies_ok {
@@ -77,7 +77,7 @@ VERSION2: {
          baz => 'frew',
       })
    } 'schema not uppgrayyed';
-   $handler->upgrade_single_step(['1.0', '2.0']);
+   $handler->upgrade;
    lives_ok {
       $s->resultset('Foo')->create({
          bar => 'frew',
@@ -99,9 +99,9 @@ VERSION3: {
    ok($handler, 'DBIx::Class::DeploymentHandler w/3.0 instantiates correctly');
 
    $version = $s->schema_version();
-   $handler->create_install_ddl;
-   $handler->create_update_ddl( $version, '1.0');
-   $handler->create_update_ddl( $version, '2.0');
+   $handler->prepare_install;
+   $handler->prepare_update( '1.0', $version );
+   $handler->prepare_update( '2.0', $version );
    ok(-e 't/sql/DBICVersion-Schema-3.0-SQLite.sql', 'DDL for 3.0 got created successfully');
    ok(-e 't/sql/DBICVersion-Schema-1.0-3.0-SQLite.sql', 'DDL for migration from 1.0 to 3.0 got created successfully');
    ok(-e 't/sql/DBICVersion-Schema-2.0-3.0-SQLite.sql', 'DDL for migration from 2.0 to 3.0 got created successfully');