[Rt-commit] r15929 - in rt/3.8/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Thu Sep 11 19:12:41 EDT 2008


Author: sartak
Date: Thu Sep 11 19:12:40 2008
New Revision: 15929

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/t/savedsearch.t

Log:
 r71766 at onn:  sartak | 2008-09-11 19:07:24 -0400
 Catch a warning in t/savedsearch


Modified: rt/3.8/trunk/t/savedsearch.t
==============================================================================
--- rt/3.8/trunk/t/savedsearch.t	(original)
+++ rt/3.8/trunk/t/savedsearch.t	Thu Sep 11 19:12:40 2008
@@ -1,7 +1,8 @@
 use strict;
 use warnings;
 use RT;
-use Test::More tests => 26;
+use Test::More tests => 27;
+use Test::Warn;
 use RT::User;
 use RT::Group;
 use RT::Ticket;
@@ -142,7 +143,11 @@
 
 # This should fail -- no permission.
 my $loadedsearch4 = RT::SavedSearch->new($curruser);
-$loadedsearch4->Load($othersearch->Privacy, $othersearch->Id);
+
+warning_like {
+    $loadedsearch4->Load($othersearch->Privacy, $othersearch->Id);
+} qr/Could not load object RT::Group-\d+ when loading search/;
+
 isnt($loadedsearch4->Id, $othersearch->Id, "Did not load othersearch");
 
 # Try to update an existing search.


More information about the Rt-commit mailing list