8 use Test::More tests => 9;
11 my $shredder_utils = RT::Test::get_relocatable_file('utils.pl',
12 File::Spec->curdir());
13 require $shredder_utils;
17 my @ARGS = sort qw(limit status name member_of email replace_relations no_tickets);
19 use_ok('RT::Shredder::Plugin::Users');
21 my $plugin = new RT::Shredder::Plugin::Users;
22 isa_ok($plugin, 'RT::Shredder::Plugin::Users');
24 is(lc $plugin->Type, 'search', 'correct type');
26 my @args = sort $plugin->SupportArgs;
27 cmp_deeply(\@args, \@ARGS, "support all args");
30 my ($status, $msg) = $plugin->TestArgs( name => 'r??t*' );
31 ok($status, "arg name = 'r??t*'") or diag("error: $msg");
33 for (qw(any disabled enabled)) {
34 my ($status, $msg) = $plugin->TestArgs( status => $_ );
35 ok($status, "arg status = '$_'") or diag("error: $msg");
37 ($status, $msg) = $plugin->TestArgs( status => '!@#' );
38 ok(!$status, "bad 'status' arg value");