RT 4.0.13
[freeside.git] / rt / t / shredder / 03plugin.t
index 190f40a..15766cd 100644 (file)
@@ -1,11 +1,10 @@
-#!/usr/bin/perl -w
 
 use strict;
 use warnings;
 
 use Test::Deep;
 use File::Spec;
-use Test::More tests => 28;
+use Test::More tests => 28 + 1; # plus one for warnings check
 use RT::Test ();
 BEGIN {
     my $shredder_utils = RT::Test::get_relocatable_file('utils.pl',
@@ -17,7 +16,7 @@ my @PLUGINS = sort qw(Attachments Base Objects SQLDump Summary Tickets Users);
 
 use_ok('RT::Shredder::Plugin');
 {
-    my $plugin = new RT::Shredder::Plugin;
+    my $plugin = RT::Shredder::Plugin->new;
     isa_ok($plugin, 'RT::Shredder::Plugin');
     my %plugins = $plugin->List;
     cmp_deeply( [sort keys %plugins], [@PLUGINS], "correct plugins" );
@@ -28,7 +27,7 @@ use_ok('RT::Shredder::Plugin');
 }
 { # reblessing on LoadByName
     foreach (@PLUGINS) {
-        my $plugin = new RT::Shredder::Plugin;
+        my $plugin = RT::Shredder::Plugin->new;
         isa_ok($plugin, 'RT::Shredder::Plugin');
         my ($status, $msg) = $plugin->LoadByName( $_ );
         ok($status, "loaded plugin by name") or diag("error: $msg");
@@ -36,7 +35,7 @@ use_ok('RT::Shredder::Plugin');
     }
 }
 { # error checking in LoadByName
-    my $plugin = new RT::Shredder::Plugin;
+    my $plugin = RT::Shredder::Plugin->new;
     isa_ok($plugin, 'RT::Shredder::Plugin');
     my ($status, $msg) = $plugin->LoadByName;
     ok(!$status, "not loaded plugin - empty name");