[Rt-commit] r15911 - in rt/3.8/trunk: lib/RT/Test

sartak at bestpractical.com sartak at bestpractical.com
Thu Sep 11 04:42:43 EDT 2008


Author: sartak
Date: Thu Sep 11 04:42:24 2008
New Revision: 15911

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/lib/RT/Test/Web.pm

Log:
 r71638 at onn:  sartak | 2008-09-11 04:40:51 -0400
 Convenience method get_warnings in RT's mech subclass


Modified: rt/3.8/trunk/lib/RT/Test/Web.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Test/Web.pm	(original)
+++ rt/3.8/trunk/lib/RT/Test/Web.pm	Thu Sep 11 04:42:24 2008
@@ -137,4 +137,17 @@
     return 1;
 }
 
+sub get_warnings {
+    my $self = shift;
+    my $server_class = 'RT::Interface::Web::Standalone';
+
+    my $url = $server_class->test_warning_path;
+
+    local $Test::Builder::Level = $Test::Builder::Level + 1;
+    return unless $self->get_ok($url);
+
+    my @warnings = $server_class->decode_warnings($self->content);
+    return @warnings;
+}
+
 1;


More information about the Rt-commit mailing list