X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2Fshredder%2F03plugin.t;h=15766cd2e1da32dfcdc401902c05a4715d31b537;hb=cb7ff9f91771b63d712493d966de041d857e83e7;hp=190f40acf00df26264c0ad30cac1a2e831379b84;hpb=b4b0c7e72d7eaee2fbfc7022022c9698323203dd;p=freeside.git diff --git a/rt/t/shredder/03plugin.t b/rt/t/shredder/03plugin.t index 190f40acf..15766cd2e 100644 --- a/rt/t/shredder/03plugin.t +++ b/rt/t/shredder/03plugin.t @@ -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");