[Rt-commit] rt branch, librarize-search-logic, updated. 6cfc7fa5331aa26987138913485b0af775bf18ce
jesse
jesse at bestpractical.com
Fri Nov 6 12:30:19 EST 2009
The branch, librarize-search-logic has been updated
via 6cfc7fa5331aa26987138913485b0af775bf18ce (commit)
via 1e1e66f84cb43884f4f5df8a3c50efd4b59d7d99 (commit)
via 26191cb90b236d4a6cf709eb9aa99bc868bd2901 (commit)
via 7870e7f02e059a58ad5c56c547896478c406ef31 (commit)
via 253eb19ea1ecf029cb169602530541238ebaedd6 (commit)
via 2d829f9e24074edc8540abc682e2a055394041bc (commit)
via 48a4a71d8ecf727bf39dcf03abcf88146d292682 (commit)
via 2544419240167e9a8fd4a915520056f425b835ff (commit)
via 7e36049dd282388af0b4d98bd22e274043774b85 (commit)
via 5fe2e74c6f5d127fa74132df4620c870212533b8 (commit)
from 0e1481c9637a9a3c86dbd062f58b18c518c84030 (commit)
Summary of changes:
lib/RT/Test.pm | 14 ++++++++------
share/html/Elements/Error | 3 ++-
t/00-compile.t | 2 +-
t/00-mason-syntax.t | 2 +-
t/api/action-createtickets.t | 2 +-
t/api/attachment.t | 2 +-
t/api/attribute-tests.t | 2 +-
t/api/attribute.t | 2 +-
t/api/cf.t | 2 +-
t/api/cf_combo_casacade.t | 2 +-
t/api/cf_external.t | 2 +-
t/api/cf_pattern.t | 2 +-
t/api/cf_single_values.t | 2 +-
t/api/cf_transaction.t | 2 +-
t/api/config.t | 2 +-
t/api/customfield.t | 2 +-
t/api/date.t | 2 +-
t/api/emailparser.t | 2 +-
t/api/group.t | 2 +-
t/api/groups.t | 2 +-
t/api/i18n.t | 2 +-
t/api/paging.t | 2 +-
t/api/queue.t | 2 +-
t/api/record.t | 2 +-
t/api/reminders.t | 2 +-
t/api/rights.t | 2 +-
t/api/rules-preview.t | 2 +-
t/api/scrip_order.t | 2 +-
t/api/searchbuilder.t | 2 +-
t/api/system.t | 2 +-
t/api/template-insert.t | 2 +-
t/api/ticket.t | 2 +-
t/api/tickets.t | 2 +-
t/api/tickets_overlay_sql.t | 2 +-
t/api/uri-custom.t | 2 +-
t/api/user.t | 2 +-
t/api/users.t | 2 +-
t/approval/basic.t | 2 +-
t/clicky.t | 2 +-
t/cron.t | 2 +-
t/i18n/default.t | 2 +-
t/lorzy/accessor.t | 2 +-
t/lorzy/action.t | 2 +-
t/lorzy/condition-lambda.t | 2 +-
t/lorzy/error.t | 2 +-
t/lorzy/update.t | 2 +-
t/mail/charsets-outgoing.t | 2 +-
t/mail/crypt-gnupg.t | 2 +-
t/mail/gateway.t | 19 ++++++++++++++++---
t/mail/gnupg-bad.t | 2 +-
t/mail/gnupg-incoming.t | 2 +-
t/mail/gnupg-realmail.t | 10 ++++++++--
t/mail/gnupg-reverification.t | 8 +++-----
t/mail/mime_decoding.t | 2 +-
t/mail/sendmail.t | 2 +-
t/maildigest/attributes.t | 2 +-
t/plugin.t | 2 +-
t/rtname.t | 2 +-
t/savedsearch.t | 2 +-
t/shredder/00skeleton.t | 2 +-
t/shredder/01basics.t | 2 +-
t/shredder/01ticket.t | 2 +-
t/shredder/02group_member.t | 2 +-
t/shredder/02queue.t | 2 +-
t/shredder/02template.t | 2 +-
t/shredder/02user.t | 2 +-
t/shredder/03plugin.t | 2 +-
t/shredder/03plugin_summary.t | 2 +-
t/shredder/03plugin_tickets.t | 2 +-
t/shredder/03plugin_users.t | 2 +-
t/ticket/action_linear_escalate.t | 2 +-
t/ticket/add-watchers.t | 2 +-
t/ticket/badlinks.t | 2 +-
t/ticket/batch-upload-csv.t | 2 +-
t/ticket/cfsort-freeform-multiple.t | 2 +-
t/ticket/cfsort-freeform-single.t | 2 +-
t/ticket/deferred_owner.t | 2 +-
t/ticket/link_search.t | 2 +-
t/ticket/merge.t | 2 +-
t/ticket/pawsort.t | 2 +-
t/ticket/quicksearch.t | 2 +-
t/ticket/requestor-order.t | 2 +-
t/ticket/search.t | 2 +-
t/ticket/search_by_links.t | 2 +-
t/ticket/search_by_txn.t | 2 +-
t/ticket/search_by_watcher.t | 2 +-
t/ticket/search_long_cf_values.t | 2 +-
t/ticket/sort-by-queue.t | 2 +-
t/ticket/sort-by-user.t | 2 +-
t/ticket/sort_by_cf.t | 2 +-
t/web/attachments.t | 2 +-
t/web/basic.t | 2 +-
t/web/cf_access.t | 2 +-
t/web/cf_onqueue.t | 2 +-
t/web/cf_select_one.t | 2 +-
t/web/command_line.t | 8 ++++++--
t/web/compilation_errors.t | 25 ++++++++++++++++---------
t/web/crypt-gnupg.t | 6 ++++--
t/web/custom_frontpage.t | 2 +-
t/web/custom_search.t | 2 +-
t/web/dashboards-groups.t | 4 ++--
t/web/dashboards.t | 12 +++++++-----
t/web/gnupg-outgoing.t | 2 +-
t/web/gnupg-select-keys-on-create.t | 5 +++--
t/web/gnupg-select-keys-on-update.t | 5 +++--
t/web/query_builder.t | 2 +-
t/web/quicksearch.t | 2 +-
t/web/rest.t | 2 +-
t/web/rights.t | 2 +-
t/web/rights1.t | 5 +++--
t/web/ticket-create-utf8.t | 2 +-
t/web/ticket_owner.t | 2 +-
t/web/ticket_seen.t | 2 +-
t/web/unlimited_search.t | 2 +-
114 files changed, 182 insertions(+), 144 deletions(-)
- Log -----------------------------------------------------------------
commit 5fe2e74c6f5d127fa74132df4620c870212533b8
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Nov 6 10:22:53 2009 +0800
use Jifty->log->debug instead of error in share/html/Elements/Error
diff --git a/share/html/Elements/Error b/share/html/Elements/Error
index 9a976af..8b91cde 100755
--- a/share/html/Elements/Error
+++ b/share/html/Elements/Error
@@ -79,7 +79,8 @@ $error .= " ($details)" if defined $details && length $details;
use Encode ();
Encode::_utf8_off($error);
-Jifty->log->error($error);
+# yeah! use debug here to cause few warnings
+Jifty->log->debug($error);
if ( defined Jifty->web->session->get('SessionType') && Jifty->web->session->get('SessionType') eq 'REST' ) {
$r->content_type('text/plain');
commit 7e36049dd282388af0b4d98bd22e274043774b85
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Nov 6 11:27:45 2009 +0800
update tests: showing the user an error un the webui with /Elements/Error, like "permission denied" or "no such ticket" no longer issues an "error" log entry
diff --git a/t/web/dashboards-groups.t b/t/web/dashboards-groups.t
index b79e660..c62d6f1 100644
--- a/t/web/dashboards-groups.t
+++ b/t/web/dashboards-groups.t
@@ -94,7 +94,7 @@ $m->get_ok("/Dashboards/Modify.html?id=$id");
$m->content_lacks("inner dashboard", "no SeeGroupDashboard right");
$m->content_contains("Permission denied");
-$m->warnings_like(qr/Permission denied/, "got a permission denied warning");
+$m->no_warnings_ok;
$user_obj->principal->grant_right(right => 'SeeGroupDashboard', object => $inner_group);
$m->get_ok("/Dashboards/Modify.html?id=$id");
diff --git a/t/web/dashboards.t b/t/web/dashboards.t
index d5d7355..5a42deb 100644
--- a/t/web/dashboards.t
+++ b/t/web/dashboards.t
@@ -50,7 +50,8 @@ $m->get_ok($url."/Dashboards/Modify.html?create=1");
$m->content_contains("Permission denied");
$m->content_lacks("Save Changes");
-$m->warnings_like(qr/Permission denied/, "got a permission denied warning");
+# permission denied is not error in RT
+$m->no_warnings_ok;
$user_obj->principal->grant_right(
right => 'CreateOwnDashboard',
@@ -150,7 +151,7 @@ $m->get_ok("/Dashboards/Subscription.html?dashboard_id=$id");
$m->form_name( 'subscribe_dashboard' );
$m->click_button(name => 'save');
$m->content_contains("Permission denied");
-$m->warnings_like(qr/Unable to subscribe to dashboard.*Permission denied/, "got a permission denied warning when trying to subscribe to a dashboard");
+$m->no_warnings_ok;
Jifty::DBI::Record::Cachable->flush_cache;
is($user_obj->attributes->named('Subscription'), 0, "no subscriptions");
@@ -181,7 +182,7 @@ $m->content_contains("Modify the subscription to dashboard different dashboard")
$m->get_ok("/Dashboards/Modify.html?id=$id&delete=1");
$m->content_contains("Permission denied", "unable to delete dashboard because we lack DeleteOwnDashboard");
-$m->warnings_like(qr/Couldn't delete dashboard.*Permission denied/, "got a permission denied warning when trying to delete the dashboard");
+$m->no_warnings_ok;
$user_obj->principal->grant_right(right => 'DeleteOwnDashboard', object => RT->system );
$m->get_ok("/Dashboards/Modify.html?id=$id");
@@ -194,7 +195,7 @@ $m->content_contains("Deleted dashboard $id");
$m->get("/Dashboards/Modify.html?id=$id");
$m->content_lacks("different dashboard", "dashboard was deleted");
$m->content_contains("Failed to load dashboard $id");
-$m->warnings_like(qr/Failed to load dashboard.*Couldn't find row/, "the dashboard was deleted");
+$m->no_warnings_ok;
$user_obj->principal->grant_right(right => "SuperUser", object => RT->system);
commit 2544419240167e9a8fd4a915520056f425b835ff
Author: Chia-liang Kao <clkao at bestpractical.com>
Date: Thu Nov 5 10:20:45 2009 +0800
Provide skip_rest in RT::Test.
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index d3649cc..604439b 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -68,7 +68,7 @@ wrap 'HTTP::Request::Common::form_data', post => sub {
}
};
-our @EXPORT = qw(is_empty);
+our @EXPORT = qw(is_empty skip_rest);
my $config;
@@ -562,6 +562,13 @@ sub clean_caught_mails {
unlink $MAILBOX_CATCHER;
}
+sub skip_rest {
+ my ($reason) = @_;
+ my $tb = Jifty::Test->builder;
+ $tb->skip($reason) for (1..$tb->expected_tests);
+ exit;
+}
+
sub file_content {
my $self = shift;
my $path = shift;
commit 48a4a71d8ecf727bf39dcf03abcf88146d292682
Author: Chia-liang Kao <clkao at bestpractical.com>
Date: Thu Nov 5 10:21:04 2009 +0800
Plan the tests ahead of skipping.
diff --git a/t/mail/gnupg-reverification.t b/t/mail/gnupg-reverification.t
index 7d71e67..12ee53b 100644
--- a/t/mail/gnupg-reverification.t
+++ b/t/mail/gnupg-reverification.t
@@ -2,16 +2,14 @@
use strict;
use warnings;
-use RT::Test;
+use RT::Test tests => 159;
use RT::Test::Email;
-plan skip_all => 'GnuPG required.'
+skip_rest('GnuPG required.')
unless eval 'use GnuPG::Interface; 1';
-plan skip_all => 'gpg executable is required.'
+skip_rest('executable is required.')
unless RT::Test->find_executable('gpg');
-plan tests => 159;
-
# the test imports a bunch of signed email but not loading the public
# keys into the server first. We then check if the message can be
# reverified after importing the public keys.
commit 2d829f9e24074edc8540abc682e2a055394041bc
Author: Chia-liang Kao <clkao at bestpractical.com>
Date: Thu Nov 5 22:19:25 2009 +0800
Ensure tests with no unexpected warnings generated, from the test server side only for now.
This requires newer jifty::test with proper strict
=> 1 support.
diff --git a/t/00-compile.t b/t/00-compile.t
index 7653a27..d57f26a 100644
--- a/t/00-compile.t
+++ b/t/00-compile.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
use Test::More;
require_ok("RT");
diff --git a/t/00-mason-syntax.t b/t/00-mason-syntax.t
index a6953d2..a4aeb21 100644
--- a/t/00-mason-syntax.t
+++ b/t/00-mason-syntax.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More tests => 1;
+use RT::Test strict => 1; use Test::More tests => 1;
my $ok = 1;
diff --git a/t/api/action-createtickets.t b/t/api/action-createtickets.t
index 8e3f560..ffcb06a 100644
--- a/t/api/action-createtickets.t
+++ b/t/api/action-createtickets.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 42;
use RT;
diff --git a/t/api/attachment.t b/t/api/attachment.t
index 36c4e39..e6b3324 100644
--- a/t/api/attachment.t
+++ b/t/api/attachment.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 4;
use RT;
diff --git a/t/api/attribute-tests.t b/t/api/attribute-tests.t
index dcb89af..39a6b90 100644
--- a/t/api/attribute-tests.t
+++ b/t/api/attribute-tests.t
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use RT::Test; use Test::More tests => 34;
+use RT::Test strict => 1; use Test::More tests => 34;
diff --git a/t/api/attribute.t b/t/api/attribute.t
index 850f4af..7d32fad 100644
--- a/t/api/attribute.t
+++ b/t/api/attribute.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 7;
diff --git a/t/api/cf.t b/t/api/cf.t
index 772cb3b..090463b 100644
--- a/t/api/cf.t
+++ b/t/api/cf.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use strict;
-use RT::Test; use Test::More tests => 138;
+use RT::Test strict => 1; use Test::More tests => 138;
# Before we get going, ditch all object_cfs; this will remove
diff --git a/t/api/cf_combo_casacade.t b/t/api/cf_combo_casacade.t
index 671752f..1aaf9d5 100644
--- a/t/api/cf_combo_casacade.t
+++ b/t/api/cf_combo_casacade.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use RT::Test; use Test::More tests => 10;
+use RT::Test strict => 1; use Test::More tests => 10;
diff --git a/t/api/cf_external.t b/t/api/cf_external.t
index 65b36dc..fb84b37 100644
--- a/t/api/cf_external.t
+++ b/t/api/cf_external.t
@@ -2,7 +2,7 @@
use warnings;
use strict;
-use RT::Test; use Test::More tests => 12;
+use RT::Test strict => 1; use Test::More tests => 12;
sub new {
diff --git a/t/api/cf_pattern.t b/t/api/cf_pattern.t
index c3b8cc0..1fb3120 100644
--- a/t/api/cf_pattern.t
+++ b/t/api/cf_pattern.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use RT::Test; use Test::More tests => 17;
+use RT::Test strict => 1; use Test::More tests => 17;
use RT;
diff --git a/t/api/cf_single_values.t b/t/api/cf_single_values.t
index 3ea18d9..3ab9634 100644
--- a/t/api/cf_single_values.t
+++ b/t/api/cf_single_values.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use RT::Test; use Test::More tests => 8;
+use RT::Test strict => 1; use Test::More tests => 8;
use RT;
diff --git a/t/api/cf_transaction.t b/t/api/cf_transaction.t
index 944b315..f2ba336 100644
--- a/t/api/cf_transaction.t
+++ b/t/api/cf_transaction.t
@@ -3,7 +3,7 @@
use warnings;
use strict;
use Data::Dumper;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 14;
diff --git a/t/api/config.t b/t/api/config.t
index 3292f29..cd0e850 100644
--- a/t/api/config.t
+++ b/t/api/config.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test tests => 7;
+use RT::Test strict => 1, tests => 7;
use_ok('RT::Model::Config');
my $config = RT::Model::Config->new;
isa_ok( $config, 'RT::Model::Config' );
diff --git a/t/api/customfield.t b/t/api/customfield.t
index d8fa764..f9a2891 100644
--- a/t/api/customfield.t
+++ b/t/api/customfield.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 25;
use RT;
diff --git a/t/api/date.t b/t/api/date.t
index 50fb12d..514857c 100644
--- a/t/api/date.t
+++ b/t/api/date.t
@@ -2,7 +2,7 @@
use warnings; use strict;
use Test::MockTime qw(set_fixed_time restore_time);
-use RT::Test;
+use RT::Test strict => 1;
use Test::More tests => 92;
diff --git a/t/api/emailparser.t b/t/api/emailparser.t
index db14817..b22f052 100644
--- a/t/api/emailparser.t
+++ b/t/api/emailparser.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 4;
use RT;
diff --git a/t/api/group.t b/t/api/group.t
index 391e605..a7efe17 100644
--- a/t/api/group.t
+++ b/t/api/group.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test tests => 37;
+use RT::Test strict => 1, tests => 37;
diff --git a/t/api/groups.t b/t/api/groups.t
index f8e0139..5f2f458 100644
--- a/t/api/groups.t
+++ b/t/api/groups.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 28;
diff --git a/t/api/i18n.t b/t/api/i18n.t
index 636a401..42f0993 100644
--- a/t/api/i18n.t
+++ b/t/api/i18n.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use RT;
#plan tests => 12;
diff --git a/t/api/paging.t b/t/api/paging.t
index c9a2532..b15def3 100644
--- a/t/api/paging.t
+++ b/t/api/paging.t
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use RT::Test tests => 11;
+use RT::Test strict => 1, tests => 11;
for (1 .. 10) {
my $t = RT::Model::Ticket->new(current_user => RT->system_user);
diff --git a/t/api/queue.t b/t/api/queue.t
index 7e3118e..8ab7da3 100644
--- a/t/api/queue.t
+++ b/t/api/queue.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 27;
use RT;
use RT::Model::Queue;
diff --git a/t/api/record.t b/t/api/record.t
index ebd97e6..56452d2 100644
--- a/t/api/record.t
+++ b/t/api/record.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
plan tests => 22;
use RT;
diff --git a/t/api/reminders.t b/t/api/reminders.t
index d5d08fc..488b07d 100644
--- a/t/api/reminders.t
+++ b/t/api/reminders.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
use Test::More;
plan tests => 20;
use RT;
diff --git a/t/api/rights.t b/t/api/rights.t
index f188e1d..d25e1f2 100644
--- a/t/api/rights.t
+++ b/t/api/rights.t
@@ -47,7 +47,7 @@
#
# END BPS TAGGED BLOCK }}}
-use RT::Test; use Test::More tests => 26;
+use RT::Test strict => 1; use Test::More tests => 26;
use RT;
diff --git a/t/api/rules-preview.t b/t/api/rules-preview.t
index 69cae46..667e063 100644
--- a/t/api/rules-preview.t
+++ b/t/api/rules-preview.t
@@ -1,6 +1,6 @@
#!/usr/bin/perl
use strict;
-use RT::Test; use Test::More tests => 5;
+use RT::Test strict => 1; use Test::More tests => 5;
use_ok('RT::Interface::Web');
my $queue = RT::Model::Queue->new(current_user => RT->system_user );
$queue->create( name => 'RecordCustomFields-'.$$ );
diff --git a/t/api/scrip_order.t b/t/api/scrip_order.t
index 40ef99d..bdb682a 100644
--- a/t/api/scrip_order.t
+++ b/t/api/scrip_order.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test; use Test::More tests => 7;
+use RT::Test strict => 1; use Test::More tests => 7;
use RT;
SKIP: {
diff --git a/t/api/searchbuilder.t b/t/api/searchbuilder.t
index 8ea58f6..4d35588 100644
--- a/t/api/searchbuilder.t
+++ b/t/api/searchbuilder.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 11;
use RT;
diff --git a/t/api/system.t b/t/api/system.t
index 32f9526..f1d9a5e 100644
--- a/t/api/system.t
+++ b/t/api/system.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test tests => 11;
+use RT::Test strict => 1, tests => 11;
use RT;
diff --git a/t/api/template-insert.t b/t/api/template-insert.t
index 118294f..6657ecd 100644
--- a/t/api/template-insert.t
+++ b/t/api/template-insert.t
@@ -3,7 +3,7 @@
use warnings;
use strict;
-use RT::Test; use Test::More tests => 7;
+use RT::Test strict => 1; use Test::More tests => 7;
use RT;
diff --git a/t/api/ticket.t b/t/api/ticket.t
index dd04ecc..2dbe742 100644
--- a/t/api/ticket.t
+++ b/t/api/ticket.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test tests => 88, l10n => 1;
+use RT::Test strict => 1, tests => 88, l10n => 1;
{
diff --git a/t/api/tickets.t b/t/api/tickets.t
index 2aae44a..253076d 100644
--- a/t/api/tickets.t
+++ b/t/api/tickets.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 16;
use RT;
diff --git a/t/api/tickets_overlay_sql.t b/t/api/tickets_overlay_sql.t
index b1547a4..9507502 100644
--- a/t/api/tickets_overlay_sql.t
+++ b/t/api/tickets_overlay_sql.t
@@ -1,5 +1,5 @@
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 7;
use RT;
diff --git a/t/api/uri-custom.t b/t/api/uri-custom.t
index c1dee40..bdb8d79 100644
--- a/t/api/uri-custom.t
+++ b/t/api/uri-custom.t
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use RT::Test; use Test::More tests => 14;
+use RT::Test strict => 1; use Test::More tests => 14;
use RT;
{
diff --git a/t/api/user.t b/t/api/user.t
index 76d5f74..9a658ec 100644
--- a/t/api/user.t
+++ b/t/api/user.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 104;
use RT;
diff --git a/t/api/users.t b/t/api/users.t
index df50299..39db5bb 100644
--- a/t/api/users.t
+++ b/t/api/users.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 11;
use RT;
no warnings qw/redefine once/;
diff --git a/t/approval/basic.t b/t/approval/basic.t
index c9fa68a..51256d1 100644
--- a/t/approval/basic.t
+++ b/t/approval/basic.t
@@ -10,7 +10,7 @@ BEGIN {
plan tests => 32;
-use RT::Test;
+use RT::Test strict => 1;
use RT::Test::Email;
RT->config->set( use_transaction_batch => 1 );
diff --git a/t/clicky.t b/t/clicky.t
index 51b3391..74437f3 100644
--- a/t/clicky.t
+++ b/t/clicky.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
my %clicky = map { $_ => 1 } grep $_, @{RT->config->get('active_make_clicky')};
diff --git a/t/cron.t b/t/cron.t
index 8a25a83..918bea2 100644
--- a/t/cron.t
+++ b/t/cron.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 23;
use RT;
diff --git a/t/i18n/default.t b/t/i18n/default.t
index 3ee2475..4526ddf 100644
--- a/t/i18n/default.t
+++ b/t/i18n/default.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use RT::Test tests => 8, l10n => 1;
+use RT::Test strict => 1, tests => 8, l10n => 1;
my ($baseurl, $m) = RT::Test->started_ok;
$m->get_ok('/');
diff --git a/t/lorzy/accessor.t b/t/lorzy/accessor.t
index 9e99680..bc78fcf 100644
--- a/t/lorzy/accessor.t
+++ b/t/lorzy/accessor.t
@@ -1,5 +1,5 @@
use Test::More tests => 4;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use warnings;
diff --git a/t/lorzy/action.t b/t/lorzy/action.t
index 0baae0b..c68588b 100644
--- a/t/lorzy/action.t
+++ b/t/lorzy/action.t
@@ -1,5 +1,5 @@
use Test::More tests => 9;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use warnings;
diff --git a/t/lorzy/condition-lambda.t b/t/lorzy/condition-lambda.t
index 7ccc132..04e9b04 100644
--- a/t/lorzy/condition-lambda.t
+++ b/t/lorzy/condition-lambda.t
@@ -1,5 +1,5 @@
use Test::More tests => 6;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use warnings;
diff --git a/t/lorzy/error.t b/t/lorzy/error.t
index 1c6cb89..2f36e42 100644
--- a/t/lorzy/error.t
+++ b/t/lorzy/error.t
@@ -1,5 +1,5 @@
use Test::More tests => 6;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use warnings;
diff --git a/t/lorzy/update.t b/t/lorzy/update.t
index d7f6b29..2350c2a 100644
--- a/t/lorzy/update.t
+++ b/t/lorzy/update.t
@@ -1,5 +1,5 @@
use Test::More tests => 10;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use warnings;
diff --git a/t/mail/charsets-outgoing.t b/t/mail/charsets-outgoing.t
index 1553c97..03104c0 100644
--- a/t/mail/charsets-outgoing.t
+++ b/t/mail/charsets-outgoing.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
use utf8;
use Test::More;
diff --git a/t/mail/crypt-gnupg.t b/t/mail/crypt-gnupg.t
index 021f870..b94c94b 100644
--- a/t/mail/crypt-gnupg.t
+++ b/t/mail/crypt-gnupg.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan skip_all => 'GnuPG required.'
unless eval 'use GnuPG::Interface; 1';
plan skip_all => 'gpg executable is required.'
diff --git a/t/mail/gateway.t b/t/mail/gateway.t
index 229a248..c0c0ec2 100644
--- a/t/mail/gateway.t
+++ b/t/mail/gateway.t
@@ -56,7 +56,7 @@ rt-mailgate - Mail interface to RT3.
use strict;
use warnings;
-use RT::Test; use Test::More tests => 159;
+use RT::Test strict => 0, tests => 159;
my ($baseurl, $ua) = RT::Test->started_ok;
diff --git a/t/mail/gnupg-bad.t b/t/mail/gnupg-bad.t
index c5e28c2..b706a4f 100644
--- a/t/mail/gnupg-bad.t
+++ b/t/mail/gnupg-bad.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
use Test::More;
plan skip_all => 'GnuPG required.'
diff --git a/t/mail/gnupg-incoming.t b/t/mail/gnupg-incoming.t
index 48321a2..d1fce46 100644
--- a/t/mail/gnupg-incoming.t
+++ b/t/mail/gnupg-incoming.t
@@ -4,7 +4,7 @@ use warnings;
use Test::More;
-use RT::Test;
+use RT::Test strict => 1;
plan skip_all => 'GnuPG required.'
unless eval 'use GnuPG::Interface; 1';
plan skip_all => 'gpg executable is required.'
diff --git a/t/mail/gnupg-realmail.t b/t/mail/gnupg-realmail.t
index 23cb35c..0e14665 100644
--- a/t/mail/gnupg-realmail.t
+++ b/t/mail/gnupg-realmail.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 0;
use Test::More;
plan skip_all => 'GnuPG required.'
diff --git a/t/mail/gnupg-reverification.t b/t/mail/gnupg-reverification.t
index 12ee53b..477cab6 100644
--- a/t/mail/gnupg-reverification.t
+++ b/t/mail/gnupg-reverification.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use RT::Test tests => 159;
+use RT::Test tests => 159, strict => 1;
use RT::Test::Email;
skip_rest('GnuPG required.')
diff --git a/t/mail/mime_decoding.t b/t/mail/mime_decoding.t
index 0dc08c8..ef516b3 100644
--- a/t/mail/mime_decoding.t
+++ b/t/mail/mime_decoding.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use strict;
use warnings;
-use RT::Test; use Test::More tests => 6;
+use RT::Test strict => 1; use Test::More tests => 6;
use_ok('RT::I18N');
diff --git a/t/mail/sendmail.t b/t/mail/sendmail.t
index d155939..2235825 100644
--- a/t/mail/sendmail.t
+++ b/t/mail/sendmail.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test; use Test::More tests => 117;
+use RT::Test strict => 1; use Test::More tests => 117;
use File::Spec ();
diff --git a/t/maildigest/attributes.t b/t/maildigest/attributes.t
index e37876f..463b496 100644
--- a/t/maildigest/attributes.t
+++ b/t/maildigest/attributes.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use Test::More tests => 31;
use RT;
diff --git a/t/plugin.t b/t/plugin.t
index 369bf27..2106786 100644
--- a/t/plugin.t
+++ b/t/plugin.t
@@ -27,7 +27,7 @@ BEGIN {
ok( RT->plugins->[0]->name, 'RT-Extension-Test' );
}
-use RT::Test;
+use RT::Test strict => 1;
my ($baseurl, $agent) = RT::Test->started_ok;
$agent->get_ok($baseurl);
$agent->get_ok($baseurl . '/NoAuth/test.html');
diff --git a/t/rtname.t b/t/rtname.t
index 5551104..0fb7e4d 100644
--- a/t/rtname.t
+++ b/t/rtname.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use strict;
use warnings;
-use RT::Test; use Test::More tests => 9;
+use RT::Test strict => 1; use Test::More tests => 9;
use RT::Interface::Email;
diff --git a/t/savedsearch.t b/t/savedsearch.t
index 1a8f895..46b8c8e 100644
--- a/t/savedsearch.t
+++ b/t/savedsearch.t
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use RT::Test; use Test::More tests => 27;
+use RT::Test strict => 1; use Test::More tests => 27;
use RT::Model::User;
use RT::Model::Group;
use RT::Model::Ticket;
diff --git a/t/shredder/00skeleton.t b/t/shredder/00skeleton.t
index 572696f..61e0e6c 100644
--- a/t/shredder/00skeleton.t
+++ b/t/shredder/00skeleton.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use Test::Deep;
use File::Spec;
use RT::Test::Shredder;
diff --git a/t/shredder/01basics.t b/t/shredder/01basics.t
index 713285e..2037a8a 100644
--- a/t/shredder/01basics.t
+++ b/t/shredder/01basics.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use File::Spec;
use Test::Deep;
use RT::Test::Shredder;
diff --git a/t/shredder/01ticket.t b/t/shredder/01ticket.t
index 22054f6..d0864e9 100644
--- a/t/shredder/01ticket.t
+++ b/t/shredder/01ticket.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use Test::Deep;
use File::Spec;
diff --git a/t/shredder/02group_member.t b/t/shredder/02group_member.t
index 5af904b..f349d6e 100644
--- a/t/shredder/02group_member.t
+++ b/t/shredder/02group_member.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use Test::Deep;
use File::Spec;
use RT::Test::Shredder;
diff --git a/t/shredder/02queue.t b/t/shredder/02queue.t
index 14b8d58..66449b4 100644
--- a/t/shredder/02queue.t
+++ b/t/shredder/02queue.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use Test::Deep;
use File::Spec;
use RT::Test::Shredder;
diff --git a/t/shredder/02template.t b/t/shredder/02template.t
index cd90d5e..1aba704 100644
--- a/t/shredder/02template.t
+++ b/t/shredder/02template.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use Test::Deep;
use File::Spec;
use RT::Test::Shredder;
diff --git a/t/shredder/02user.t b/t/shredder/02user.t
index 3ff1841..95b9ca0 100644
--- a/t/shredder/02user.t
+++ b/t/shredder/02user.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use Test::Deep;
use File::Spec;
use RT::Test::Shredder;
diff --git a/t/shredder/03plugin.t b/t/shredder/03plugin.t
index 4cca181..7cfee80 100644
--- a/t/shredder/03plugin.t
+++ b/t/shredder/03plugin.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use Test::Deep;
use File::Spec;
use RT::Test::Shredder;
diff --git a/t/shredder/03plugin_summary.t b/t/shredder/03plugin_summary.t
index 9d8e45e..671b638 100644
--- a/t/shredder/03plugin_summary.t
+++ b/t/shredder/03plugin_summary.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use Test::Deep;
use File::Spec;
use RT::Test::Shredder;
diff --git a/t/shredder/03plugin_tickets.t b/t/shredder/03plugin_tickets.t
index 0afd960..204c697 100644
--- a/t/shredder/03plugin_tickets.t
+++ b/t/shredder/03plugin_tickets.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use Test::Deep;
use File::Spec;
use RT::Test::Shredder;
diff --git a/t/shredder/03plugin_users.t b/t/shredder/03plugin_users.t
index e713cbf..68bad9c 100644
--- a/t/shredder/03plugin_users.t
+++ b/t/shredder/03plugin_users.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
use Test::Deep;
use File::Spec;
use RT::Test::Shredder;
diff --git a/t/ticket/action_linear_escalate.t b/t/ticket/action_linear_escalate.t
index dee0303..ce5f5ef 100644
--- a/t/ticket/action_linear_escalate.t
+++ b/t/ticket/action_linear_escalate.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
use Test::More tests => 17;
use RT;
diff --git a/t/ticket/add-watchers.t b/t/ticket/add-watchers.t
index 8cfe464..ceeb3a5 100644
--- a/t/ticket/add-watchers.t
+++ b/t/ticket/add-watchers.t
@@ -46,7 +46,7 @@
# END BPS TAGGED BLOCK }}}
use Test::More tests => 32;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use warnings;
diff --git a/t/ticket/badlinks.t b/t/ticket/badlinks.t
index 687e0d3..cd96f6a 100644
--- a/t/ticket/badlinks.t
+++ b/t/ticket/badlinks.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
use Test::More tests => 17;
my ($baseurl, $m) = RT::Test->started_ok;
diff --git a/t/ticket/batch-upload-csv.t b/t/ticket/batch-upload-csv.t
index 3b7d1ed..ca8b179 100644
--- a/t/ticket/batch-upload-csv.t
+++ b/t/ticket/batch-upload-csv.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict; use warnings;
-use RT::Test; use Test::More tests => 12;
+use RT::Test strict => 1; use Test::More tests => 12;
use_ok('RT');
diff --git a/t/ticket/cfsort-freeform-multiple.t b/t/ticket/cfsort-freeform-multiple.t
index c8304eb..d62bd2c 100644
--- a/t/ticket/cfsort-freeform-multiple.t
+++ b/t/ticket/cfsort-freeform-multiple.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use Test::More tests => 24;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use warnings;
diff --git a/t/ticket/cfsort-freeform-single.t b/t/ticket/cfsort-freeform-single.t
index 39ef591..a4d7e9c 100644
--- a/t/ticket/cfsort-freeform-single.t
+++ b/t/ticket/cfsort-freeform-single.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use Test::More tests => 57;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use warnings;
diff --git a/t/ticket/deferred_owner.t b/t/ticket/deferred_owner.t
index db4aa6f..c005477 100644
--- a/t/ticket/deferred_owner.t
+++ b/t/ticket/deferred_owner.t
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use RT::Test tests => 20;
+use RT::Test strict => 1, tests => 20;
use_ok('RT');
use_ok('RT::Model::Ticket');
diff --git a/t/ticket/link_search.t b/t/ticket/link_search.t
index 4534975..d6e2059 100644
--- a/t/ticket/link_search.t
+++ b/t/ticket/link_search.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use warnings;
use strict;
-use RT::Test; use Test::More tests => 63;
+use RT::Test strict => 1; use Test::More tests => 63;
# Load the config file
diff --git a/t/ticket/merge.t b/t/ticket/merge.t
index 730532a..083697a 100644
--- a/t/ticket/merge.t
+++ b/t/ticket/merge.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More tests => '17';
+use RT::Test strict => 1; use Test::More tests => '17';
use RT;
diff --git a/t/ticket/pawsort.t b/t/ticket/pawsort.t
index 1933207..064395e 100644
--- a/t/ticket/pawsort.t
+++ b/t/ticket/pawsort.t
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 7;
use RT;
diff --git a/t/ticket/quicksearch.t b/t/ticket/quicksearch.t
index 593a2b1..3e97a04 100644
--- a/t/ticket/quicksearch.t
+++ b/t/ticket/quicksearch.t
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 10;
use_ok('RT');
diff --git a/t/ticket/requestor-order.t b/t/ticket/requestor-order.t
index 227b20a..e7987fd 100644
--- a/t/ticket/requestor-order.t
+++ b/t/ticket/requestor-order.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict; use warnings;
-use RT::Test; use Test::More;
+use RT::Test strict => 1; use Test::More;
plan tests => 58;
use_ok('RT');
diff --git a/t/ticket/search.t b/t/ticket/search.t
index 6c04f4b..30b4330 100644
--- a/t/ticket/search.t
+++ b/t/ticket/search.t
@@ -6,7 +6,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More tests => 43;
+use RT::Test strict => 1; use Test::More tests => 43;
# setup the queue
diff --git a/t/ticket/search_by_links.t b/t/ticket/search_by_links.t
index 294532a..779a5e9 100644
--- a/t/ticket/search_by_links.t
+++ b/t/ticket/search_by_links.t
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Test::More tests => 80;
-use RT::Test;
+use RT::Test strict => 1;
use RT::Model::Ticket;
my $q = RT::Test->load_or_create_queue( name => 'Regression' );
diff --git a/t/ticket/search_by_txn.t b/t/ticket/search_by_txn.t
index 9b26e07..eeac659 100644
--- a/t/ticket/search_by_txn.t
+++ b/t/ticket/search_by_txn.t
@@ -3,7 +3,7 @@
use warnings;
use strict;
-use RT::Test; use Test::More tests => 11;
+use RT::Test strict => 1; use Test::More tests => 11;
BEGIN{ $ENV{'TZ'} = 'GMT'};
diff --git a/t/ticket/search_by_watcher.t b/t/ticket/search_by_watcher.t
index f1456a5..7438543 100644
--- a/t/ticket/search_by_watcher.t
+++ b/t/ticket/search_by_watcher.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
use Test::More tests => 119;
use RT::Model::Ticket;
diff --git a/t/ticket/search_long_cf_values.t b/t/ticket/search_long_cf_values.t
index 854380a..61132ed 100644
--- a/t/ticket/search_long_cf_values.t
+++ b/t/ticket/search_long_cf_values.t
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
use Test::More tests => 10;
diff --git a/t/ticket/sort-by-queue.t b/t/ticket/sort-by-queue.t
index 3b57cd3..7f6370f 100644
--- a/t/ticket/sort-by-queue.t
+++ b/t/ticket/sort-by-queue.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use Test::More tests => 8;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use warnings;
diff --git a/t/ticket/sort-by-user.t b/t/ticket/sort-by-user.t
index 8058b61..096856a 100644
--- a/t/ticket/sort-by-user.t
+++ b/t/ticket/sort-by-user.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use Test::More tests => 32;
-use RT::Test;
+use RT::Test strict => 1;
use strict;
use warnings;
diff --git a/t/ticket/sort_by_cf.t b/t/ticket/sort_by_cf.t
index 0fa8287..7fbd52b 100644
--- a/t/ticket/sort_by_cf.t
+++ b/t/ticket/sort_by_cf.t
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-use RT::Test; use Test::More tests => 21;
+use RT::Test strict => 1; use Test::More tests => 21;
RT::init();
diff --git a/t/web/attachments.t b/t/web/attachments.t
index 09b60fd..70a0a8f 100644
--- a/t/web/attachments.t
+++ b/t/web/attachments.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test; use Test::More tests => 14;
+use RT::Test strict => 1; use Test::More tests => 14;
use constant ImageRoot => RT->html_path . '/NoAuth/images';
use constant LogoFile => ImageRoot .'/bplogo.gif';
diff --git a/t/web/basic.t b/t/web/basic.t
index 0897ff2..9c8ca89 100644
--- a/t/web/basic.t
+++ b/t/web/basic.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use strict;
-use RT::Test tests => 21, l10n => 1;
+use RT::Test strict => 1, tests => 21, l10n => 1;
use HTTP::Request::Common;
use HTTP::Cookies;
use LWP;
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index e1a4b58..26a39b1 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test tests => 26, l10n => 1;
+use RT::Test strict => 1, tests => 26, l10n => 1;
$RT::Test::SKIP_REQUEST_WORK_AROUND = 1;
diff --git a/t/web/cf_onqueue.t b/t/web/cf_onqueue.t
index 7588959..e12c759 100644
--- a/t/web/cf_onqueue.t
+++ b/t/web/cf_onqueue.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test tests => 14, l10n => 1;
+use RT::Test strict => 1, tests => 14, l10n => 1;
my ($baseurl, $m) = RT::Test->started_ok;
ok $m->login, 'logged in';
diff --git a/t/web/cf_select_one.t b/t/web/cf_select_one.t
index cc6de3d..cd00aa6 100644
--- a/t/web/cf_select_one.t
+++ b/t/web/cf_select_one.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test tests => 41, l10n => 1;
+use RT::Test strict => 1, tests => 41, l10n => 1;
my ($baseurl, $m) = RT::Test->started_ok;
diff --git a/t/web/command_line.t b/t/web/command_line.t
index 08127ff..67704d4 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -3,7 +3,7 @@
use strict;
use Test::Expect;
use File::Spec ();
-use RT::Test tests => 241, l10n => 1;
+use RT::Test strict => 0, tests => 241, l10n => 1;
my ($baseurl, $m) = RT::Test->started_ok;
use RT::Model::User;
diff --git a/t/web/compilation_errors.t b/t/web/compilation_errors.t
index 746d47b..f4a7268 100644
--- a/t/web/compilation_errors.t
+++ b/t/web/compilation_errors.t
@@ -1,11 +1,19 @@
#!/usr/bin/perl
use strict;
-use RT::Test;
-use Test::More;
-my $tests = 2;
+use File::Find;
+
+sub wanted {
+ -f && /\.html$/ && $_ !~ /Logout.html$/;
+}
+
+my $tests;
+BEGIN {
+$tests = 2;
find ( sub { wanted() and $tests += 4 } , 'share/html/');
-plan tests => $tests;
+}
+
+use RT::Test tests => $tests, strict => 0;
use HTTP::Request::Common;
use HTTP::Cookies;
use LWP;
@@ -29,13 +37,8 @@ $agent->login(root => 'password');
like( $agent->{'content'} , qr/Logout/i, "Found a logout link");
-use File::Find;
find ( sub { wanted() and test_get($File::Find::name) } , 'share/html');
-sub wanted {
- -f && /\.html$/ && $_ !~ /Logout.html$/;
-}
-
sub test_get {
my $file = shift;
diff --git a/t/web/crypt-gnupg.t b/t/web/crypt-gnupg.t
index 1083af8..af37edd 100644
--- a/t/web/crypt-gnupg.t
+++ b/t/web/crypt-gnupg.t
@@ -2,7 +2,7 @@
use strict;
use Test::More;
-use RT::Test;
+use RT::Test strict => 0;
plan skip_all => 'GnuPG required.'
unless eval 'use GnuPG::Interface; 1';
diff --git a/t/web/custom_frontpage.t b/t/web/custom_frontpage.t
index 011bfd9..95282c1 100644
--- a/t/web/custom_frontpage.t
+++ b/t/web/custom_frontpage.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test; use Test::More tests => 7;
+use RT::Test strict => 1; use Test::More tests => 7;
my ($baseurl, $m) = RT::Test->started_ok;
diff --git a/t/web/custom_search.t b/t/web/custom_search.t
index 39f29e5..9325258 100644
--- a/t/web/custom_search.t
+++ b/t/web/custom_search.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test; use Test::More tests => 12;
+use RT::Test strict => 1; use Test::More tests => 12;
my ($baseurl, $m) = RT::Test->started_ok;
my $url = $m->rt_base_url;
diff --git a/t/web/dashboards-groups.t b/t/web/dashboards-groups.t
index c62d6f1..94566cd 100644
--- a/t/web/dashboards-groups.t
+++ b/t/web/dashboards-groups.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test tests => 38, l10n => 1;
+use RT::Test strict => 1, tests => 38, l10n => 1;
use RT::Dashboard;
my ($baseurl, $m) = RT::Test->started_ok;
diff --git a/t/web/dashboards.t b/t/web/dashboards.t
index 5a42deb..d832022 100644
--- a/t/web/dashboards.t
+++ b/t/web/dashboards.t
@@ -1,7 +1,8 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test tests => 99, l10n => 1;
+use RT::Test strict => 1, l10n => 1;
+plan tests => 99;
use RT::Dashboard;
my ($baseurl, $m) = RT::Test->started_ok;
diff --git a/t/web/gnupg-outgoing.t b/t/web/gnupg-outgoing.t
index daec882..011a152 100644
--- a/t/web/gnupg-outgoing.t
+++ b/t/web/gnupg-outgoing.t
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Test::More;
-use RT::Test;
+use RT::Test strict => 1;
plan skip_all => 'GnuPG required.'
unless eval 'use GnuPG::Interface; 1';
diff --git a/t/web/gnupg-select-keys-on-create.t b/t/web/gnupg-select-keys-on-create.t
index 29076a8..8fd10bb 100644
--- a/t/web/gnupg-select-keys-on-create.t
+++ b/t/web/gnupg-select-keys-on-create.t
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Test::More;
-use RT::Test;
+use RT::Test strict => 0;
plan skip_all => 'GnuPG required.'
unless eval 'use GnuPG::Interface; 1';
diff --git a/t/web/gnupg-select-keys-on-update.t b/t/web/gnupg-select-keys-on-update.t
index 6c8b196..cd836eb 100644
--- a/t/web/gnupg-select-keys-on-update.t
+++ b/t/web/gnupg-select-keys-on-update.t
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Test::More;
-use RT::Test;
+use RT::Test strict => 0;
plan skip_all => 'GnuPG required.'
unless eval 'use GnuPG::Interface; 1';
diff --git a/t/web/query_builder.t b/t/web/query_builder.t
index ced04f4..38ff64d 100644
--- a/t/web/query_builder.t
+++ b/t/web/query_builder.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use strict;
-use RT::Test; use Test::More tests => 42;
+use RT::Test strict => 1; use Test::More tests => 42;
use HTTP::Request::Common;
use HTTP::Cookies;
use LWP;
diff --git a/t/web/quicksearch.t b/t/web/quicksearch.t
index ffff606..0b56823 100644
--- a/t/web/quicksearch.t
+++ b/t/web/quicksearch.t
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Test::More tests => 7;
-use RT::Test;
+use RT::Test strict => 1;
my ($baseurl, $m) = RT::Test->started_ok;
my $url = $m->rt_base_url;
diff --git a/t/web/rest.t b/t/web/rest.t
index 7161bab..b88da31 100644
--- a/t/web/rest.t
+++ b/t/web/rest.t
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use RT::Test;
+use RT::Test strict => 1;
use Test::More tests => 16;
my ($baseurl, $m) = RT::Test->started_ok;
diff --git a/t/web/rights.t b/t/web/rights.t
index 4d2b8f9..2645c08 100644
--- a/t/web/rights.t
+++ b/t/web/rights.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use RT::Test; use Test::More tests => 14;
+use RT::Test strict => 1; use Test::More tests => 14;
my ($baseurl, $m) = RT::Test->started_ok;
diff --git a/t/web/rights1.t b/t/web/rights1.t
index 6eb40d2..83b1360 100644
--- a/t/web/rights1.t
+++ b/t/web/rights1.t
@@ -2,7 +2,7 @@
use strict;
use HTTP::Cookies;
-use RT::Test; use Test::More tests => 31;
+use RT::Test strict => 0, tests => 31;
my ($baseurl, $agent) = RT::Test->started_ok;
diff --git a/t/web/ticket-create-utf8.t b/t/web/ticket-create-utf8.t
index 745f3c4..92682ae 100644
--- a/t/web/ticket-create-utf8.t
+++ b/t/web/ticket-create-utf8.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test tests => 8, l10n => 1;
+use RT::Test strict => 1, tests => 8, l10n => 1;
use Encode;
diff --git a/t/web/ticket_owner.t b/t/web/ticket_owner.t
index 47dcae5..77155fa 100644
--- a/t/web/ticket_owner.t
+++ b/t/web/ticket_owner.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test tests => 93, l10n => 1;
+use RT::Test strict => 1, tests => 93, l10n => 1;
my $queue = RT::Test->load_or_create_queue( name => 'Regression' );
diff --git a/t/web/ticket_seen.t b/t/web/ticket_seen.t
index 354de69..e92d648 100644
--- a/t/web/ticket_seen.t
+++ b/t/web/ticket_seen.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::Test tests => 16, l10n => 1;
+use RT::Test strict => 1, tests => 16, l10n => 1;
my $queue = RT::Test->load_or_create_queue( name => 'Regression' );
diff --git a/t/web/unlimited_search.t b/t/web/unlimited_search.t
index 4216cb7..d83471f 100644
--- a/t/web/unlimited_search.t
+++ b/t/web/unlimited_search.t
@@ -3,7 +3,7 @@
use strict;
use Test::More tests => 8;
-use RT::Test;
+use RT::Test strict => 1;
RT::Test->started_ok;
my $ticket = RT::Model::Ticket->new(current_user => RT->system_user);
commit 253eb19ea1ecf029cb169602530541238ebaedd6
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Nov 6 15:05:07 2009 +0800
catch warnings in tests
diff --git a/t/mail/gateway.t b/t/mail/gateway.t
index c0c0ec2..7eda457 100644
--- a/t/mail/gateway.t
+++ b/t/mail/gateway.t
@@ -56,9 +56,10 @@ rt-mailgate - Mail interface to RT3.
use strict;
use warnings;
-use RT::Test strict => 0, tests => 159;
+use RT::Test strict => 1, tests => 169;
my ($baseurl, $ua) = RT::Test->started_ok;
+ok( $ua->login, 'logged in' );
use RT::Model::TicketCollection;
@@ -105,7 +106,6 @@ EOF
is ($status >> 8, 75, "The mail gateway exited with a failure");
ok (!$id, "No ticket id");
}
-
my $everyone_group;
diag "revoke rights tests depend on" if $ENV{'TEST_VERBOSE'};
{
@@ -254,6 +254,11 @@ EOF
ok( !$u->id, "user does not exist and was not Created by failed ticket submission");
}
+$ua->warnings_like(
+ [(qr/could not load a valid user/i) x 3],
+ 'got could not load user warning'
+);
+
diag "grant everybody with CreateTicket right" if $ENV{'TEST_VERBOSE'};
{
ok( RT::Test->set_rights(
@@ -309,6 +314,11 @@ EOF
ok( !$u->id, " user does not exist and was not Created by ticket correspondence submission");
}
+$ua->warnings_like(
+ [(qr/could not load a valid user/i) x 3],
+ 'got could not load user warning'
+);
+
diag "grant everyone 'ReplyToTicket' right" if $ENV{'TEST_VERBOSE'};
{
ok( RT::Test->set_rights(
@@ -388,6 +398,10 @@ EOF
ok( !$u->id, " user does not exist and was not Created by ticket comment submission");
}
+$ua->warnings_like(
+ [(qr/could not load a valid user/i) x 3],
+ 'got could not load user warning'
+);
diag "grant everyone 'CommentOnTicket' right" if $ENV{'TEST_VERBOSE'};
{
@@ -509,7 +523,6 @@ diag "Testing preservation of binary attachments" if $ENV{'TEST_VERBOSE'};
# Grab the binary attachment via the web ui
my $full_url = "$url/Ticket/Attachment/". $attachment->transaction_id
."/". $attachment->id. "/bplogo.gif";
- $ua->login();
my $r = $ua->get( $full_url );
# Verify that the downloaded attachment is the same as what we uploaded.
diff --git a/t/web/crypt-gnupg.t b/t/web/crypt-gnupg.t
index af37edd..3f8af4a 100644
--- a/t/web/crypt-gnupg.t
+++ b/t/web/crypt-gnupg.t
@@ -2,14 +2,14 @@
use strict;
use Test::More;
-use RT::Test strict => 0;
+use RT::Test strict => 1;
plan skip_all => 'GnuPG required.'
unless eval 'use GnuPG::Interface; 1';
plan skip_all => 'gpg executable is required.'
unless RT::Test->find_executable('gpg');
-plan tests => 92;
+plan tests => 93;
use RT::ScripAction::SendEmail;
@@ -388,6 +388,8 @@ hello
MAIL
((my $status), $id) = RT::Test->send_via_mailgate($mail);
+$m->warnings_like( qr/Recipient 'nokey\@example.com' is unusable/ );
+
is ($status >> 8, 0, "The mail gateway exited normally");
ok ($id, "got id of a newly created ticket - $id");
$tick = RT::Model::Ticket->new(current_user => RT->system_user );
diff --git a/t/web/gnupg-select-keys-on-create.t b/t/web/gnupg-select-keys-on-create.t
index 8fd10bb..d14094c 100644
--- a/t/web/gnupg-select-keys-on-create.t
+++ b/t/web/gnupg-select-keys-on-create.t
@@ -3,14 +3,14 @@ use strict;
use warnings;
use Test::More;
-use RT::Test strict => 0;
+use RT::Test strict => 1;
plan skip_all => 'GnuPG required.'
unless eval 'use GnuPG::Interface; 1';
plan skip_all => 'gpg executable is required.'
unless RT::Test->find_executable('gpg');
-plan tests => 60;
+plan tests => 61;
use RT::ScripAction::SendEmail;
use File::Temp qw(tempdir);
@@ -66,6 +66,7 @@ diag "check that signing doesn't work if there is no key" if $ENV{TEST_VERBOSE};
qr/unable to sign outgoing email messages/i,
'problems with passphrase'
);
+ $m->warnings_like( qr/secret key not available/, 'got secret key not available warning' );
my @mail = RT::Test->fetch_caught_mails;
ok !@mail, 'there are no outgoing emails';
diff --git a/t/web/gnupg-select-keys-on-update.t b/t/web/gnupg-select-keys-on-update.t
index cd836eb..df115cd 100644
--- a/t/web/gnupg-select-keys-on-update.t
+++ b/t/web/gnupg-select-keys-on-update.t
@@ -3,14 +3,14 @@ use strict;
use warnings;
use Test::More;
-use RT::Test strict => 0;
+use RT::Test strict => 1;
plan skip_all => 'GnuPG required.'
unless eval 'use GnuPG::Interface; 1';
plan skip_all => 'gpg executable is required.'
unless RT::Test->find_executable('gpg');
-plan tests => 68;
+plan tests => 69;
use RT::ScripAction::SendEmail;
use File::Temp qw(tempdir);
@@ -78,6 +78,7 @@ diag "check that signing doesn't work if there is no key" if $ENV{TEST_VERBOSE};
qr/unable to sign outgoing email messages/i,
'problems with passphrase'
);
+ $m->warnings_like( qr/secret key not available/, 'got secret key not available warning' );
my @mail = RT::Test->fetch_caught_mails;
ok !@mail, 'there are no outgoing emails';
commit 7870e7f02e059a58ad5c56c547896478c406ef31
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Nov 6 19:24:44 2009 +0800
more warning tests
diff --git a/t/mail/gnupg-realmail.t b/t/mail/gnupg-realmail.t
index 0e14665..bda9e00 100644
--- a/t/mail/gnupg-realmail.t
+++ b/t/mail/gnupg-realmail.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use RT::Test strict => 0;
+use RT::Test strict => 1;
use Test::More;
plan skip_all => 'GnuPG required.'
@@ -10,7 +10,7 @@ plan skip_all => 'GnuPG required.'
plan skip_all => 'gpg executable is required.'
unless RT::Test->find_executable('gpg');
-plan tests => 176;
+plan tests => 192;
use Digest::MD5 qw(md5_hex);
@@ -39,6 +39,7 @@ RT->config->set( 'mail_plugins' => ['Auth::MailFrom', 'Auth::GnuPG'] );
RT::Test->import_gnupg_key('rt-recipient at example.com');
RT::Test->import_gnupg_key('rt-test at example.com', 'public');
+RT::Test->trust_gnupg_key('rt-test at example.com');
my ($baseurl, $m) = RT::Test->started_ok;
ok $m->login, 'we did log in';
@@ -73,6 +74,11 @@ for my $usage (qw/signed encrypted signed&encrypted/) {
}
}
+$m->warnings_like(
+ [ (qr/Recipient 'ternus\@mit.edu' is unusable/ ) x 16 ],
+ "got Recipient 'ternus\@mit.edu is unusable warning"
+);
+
sub email_ok {
my ($eid, $usage, $format, $attachment) = @_;
diag "email_ok $eid: $usage, $format, $attachment" if $ENV{'TEST_VERBOSE'};
diff --git a/t/web/command_line.t b/t/web/command_line.t
index 67704d4..e20067c 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -3,9 +3,10 @@
use strict;
use Test::Expect;
use File::Spec ();
-use RT::Test strict => 0, tests => 241, l10n => 1;
+use RT::Test strict => 1, tests => 244, l10n => 1;
my ($baseurl, $m) = RT::Test->started_ok;
+ok( $m->login, 'login' );
use RT::Model::User;
use RT::Model::Queue;
use Encode;
@@ -100,7 +101,6 @@ my $othercf = RT::Model::CustomField->new(current_user => RT->system_user);
ok($val,$msg);
-
# add a comment to ticket
expect_send("comment -m 'comment-$$' $ticket_id", "Adding a comment...");
expect_like(qr/Message recorded/, "Added the comment");
@@ -117,6 +117,8 @@ ok($val,$msg);
check_attachment($test_email);
# binary attachment
check_attachment(RT->html_path.'/NoAuth/images/bplogo.gif');
+ #XXX TODO this is not so right warning
+ $m->warnings_like( qr/Encode::Guess failed/ );
# change a ticket's Owner
expect_send("edit ticket/$ticket_id set owner=root", 'Changing owner...');
@@ -149,6 +151,7 @@ expect_like(qr/queue does not exist/i, 'Errored out');
expect_send("show ticket/$ticket_id -f queue", 'Verifying lack of change...');
expect_like(qr/Queue: EditedQueue$$/, 'Verified lack of change');
+
# Test reading and setting custom fields without spaces
expect_send("show ticket/$ticket_id -f CF-myCF$$", 'Checking initial value');
expect_like(qr/CF\.{myCF$$}:/i, 'Verified initial empty value (CF-x syntax)');
@@ -334,6 +337,7 @@ my $merge_ticket_B = $1;
ok($merge_ticket_B, "Got second ticket to merge id=$merge_ticket_B");
expect_send("merge $merge_ticket_B $merge_ticket_A", 'Merging the tickets...');
expect_like(qr/Merge completed/, 'Merged the tickets');
+$m->warnings_like( qr/That principal is already a requestor/ );
expect_send("show ticket/$merge_ticket_A/history", 'Checking merge on first ticket');
expect_like(qr/Merged into ticket #$merge_ticket_A by root/, 'Merge recorded in first ticket');
commit 26191cb90b236d4a6cf709eb9aa99bc868bd2901
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Nov 6 19:25:35 2009 +0800
t/web/compilation_errors.t is so special that we can omit warnings
diff --git a/t/web/compilation_errors.t b/t/web/compilation_errors.t
index f4a7268..fe277d6 100644
--- a/t/web/compilation_errors.t
+++ b/t/web/compilation_errors.t
@@ -13,7 +13,7 @@ $tests = 2;
find ( sub { wanted() and $tests += 4 } , 'share/html/');
}
-use RT::Test tests => $tests, strict => 0;
+use RT::Test tests => $tests, strict => 1;
use HTTP::Request::Common;
use HTTP::Cookies;
use LWP;
@@ -53,4 +53,8 @@ sub test_get {
# }}}
+# it's predictable that we will get a lot of warnings because some pages need
+# mandatory arguments, let's not show the warnings
+$agent->get( '/__jifty/test_warnings' );
+
1;
commit 1e1e66f84cb43884f4f5df8a3c50efd4b59d7d99
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Nov 6 19:28:17 2009 +0800
remove useless code
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 604439b..dce8f7e 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -508,11 +508,6 @@ sub import_gnupg_key {
$key .= ".$type.key";
require RT::Crypt::GnuPG;
- ( my $volume, my $directories, my $file ) = File::Spec->splitpath($0);
- my $keys_dir = File::Spec->catdir(
- File::Spec->curdir(), $directories,
- File::Spec->updir(), qw(data gnupg keys)
- );
# this is a bit hackish; calling it from somewhere that's not a subdir
# of t/ will fail
commit 6cfc7fa5331aa26987138913485b0af775bf18ce
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Nov 6 20:07:59 2009 +0800
fix warnings in t/web/rights1.t
diff --git a/t/web/rights1.t b/t/web/rights1.t
index 83b1360..858a7e0 100644
--- a/t/web/rights1.t
+++ b/t/web/rights1.t
@@ -42,7 +42,8 @@ my ($grantid,$grantmsg) =$user_obj->principal->grant_right(right => 'ShowConfigT
ok($grantid,$grantmsg);
-$agent->reload;
+# instead of $agent->reload so $agent won't try to login again
+$agent->get( $agent->uri );
like($agent->{'content'} , qr/Logout/i, "Reloaded page successfully");
ok($agent->find_link( url => RT->config->get('web_path') . "/Admin/",
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list