[Rt-commit] rt branch, 3.999-trunk, updated. 26191cb90b236d4a6cf709eb9aa99bc868bd2901

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Nov 6 06:26:21 EST 2009


The branch, 3.999-trunk has been updated
       via  26191cb90b236d4a6cf709eb9aa99bc868bd2901 (commit)
       via  7870e7f02e059a58ad5c56c547896478c406ef31 (commit)
      from  253eb19ea1ecf029cb169602530541238ebaedd6 (commit)

Summary of changes:
 t/mail/gnupg-realmail.t    |   10 ++++++++--
 t/web/command_line.t       |    8 ++++++--
 t/web/compilation_errors.t |    6 +++++-
 3 files changed, 19 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
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;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list