Remove JSON code because we no longer need it
[dbsrgits/DBIx-Class-DeploymentHandler.git] / t / deploy_methods / sql_translator.t
index 704b998..4f10f65 100644 (file)
@@ -20,7 +20,7 @@ VERSION1: {
    my $s = DBICVersion::Schema->connect(@connection);
    my $dm = Translator->new({
       schema            => $s,
-      upgrade_directory => $sql_dir,
+      script_directory => $sql_dir,
       databases         => ['SQLite'],
       sql_translator_args          => { add_drop_table => 0 },
    });
@@ -44,11 +44,6 @@ VERSION1: {
       $dm->prepare_deploy;
       ok( $warned, 'prepare_deploy warns if you run it twice' );
    }
-   mkpath(catfile(qw( t sql _common schema 1.0 )));
-   open my $common, '>',
-      catfile(qw( t sql _common schema 1.0 002-error.sql ));
-   print {$common} qq<syntax fail\n\n>;
-   close $common;
 
    ok(
       -f catfile(qw( t sql SQLite schema 1.0 001-auto.sql )),
@@ -61,17 +56,7 @@ VERSION1: {
       })
    } 'schema not deployed';
 
-   mkpath catfile(qw( t sql _common schema 1.0 ));
-   open $common, '>',
-      catfile(qw( t sql _common schema 1.0 001-auto.sql ));
-   print {$common} qq<This will never get run>;
-   close $common;
-   {
-      my $warned = 0;
-      local $SIG{__WARN__} = sub{$warned = 1};
-      $dm->deploy;
-      ok( $warned, 'deploy warns on sql errors' );
-   }
+   $dm->deploy;
 
    lives_ok {
       $s->resultset('Foo')->create({
@@ -85,7 +70,7 @@ VERSION2: {
    my $s = DBICVersion::Schema->connect(@connection);
    my $dm = Translator->new({
       schema            => $s,
-      upgrade_directory => $sql_dir,
+      script_directory => $sql_dir,
       databases         => ['SQLite'],
       sql_translator_args          => { add_drop_table => 0 },
       txn_wrap          => 1,
@@ -192,7 +177,7 @@ VERSION3: {
    my $s = DBICVersion::Schema->connect(@connection);
    my $dm = Translator->new({
       schema            => $s,
-      upgrade_directory => $sql_dir,
+      script_directory => $sql_dir,
       databases         => ['SQLite'],
       sql_translator_args          => { add_drop_table => 0 },
       txn_wrap          => 0,