[Rt-commit] r18218 - in rt/3.999/branches/merge_to_3.8.2: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Feb 4 21:40:50 EST 2009
Author: sunnavy
Date: Wed Feb 4 21:40:49 2009
New Revision: 18218
Modified:
rt/3.999/branches/merge_to_3.8.2/ (props changed)
rt/3.999/branches/merge_to_3.8.2/lib/RT/Test/Web.pm
Log:
r19578 at sunnavys-mb: sunnavy | 2009-02-05 10:36:09 +0800
stashwarning stuff can be enabled in jifty, so no need to do it in rt
Modified: rt/3.999/branches/merge_to_3.8.2/lib/RT/Test/Web.pm
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/lib/RT/Test/Web.pm (original)
+++ rt/3.999/branches/merge_to_3.8.2/lib/RT/Test/Web.pm Wed Feb 4 21:40:49 2009
@@ -135,56 +135,4 @@
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;
-}
-
-sub warning_like {
- my $self = shift;
- my $re = shift;
- my $name = shift;
-
- local $Test::Builder::Level = $Test::Builder::Level + 1;
-
- my @warnings = $self->get_warnings;
- if ( @warnings == 0 ) {
- Test::More::fail("no warnings emitted; expected 1");
- return 0;
- }
- elsif ( @warnings > 1 ) {
- Test::More::fail( scalar(@warnings) . " warnings emitted; expected 1" );
- for (@warnings) {
- Test::More::diag("got warning: $_");
- }
- return 0;
- }
-
- return Test::More::like( $warnings[0], $re, $name );
-}
-
-sub no_warnings_ok {
- my $self = shift;
- my $name = shift || "no warnings emitted";
-
- local $Test::Builder::Level = $Test::Builder::Level + 1;
-
- my @warnings = $self->get_warnings;
-
- Test::More::is( @warnings, 0, $name );
- for (@warnings) {
- Test::More::diag("got warning: $_");
- }
-
- return @warnings == 0 ? 1 : 0;
-}
-
1;
More information about the Rt-commit
mailing list