Skip to content

Commit

Permalink
Item11501: Failing unit test
Browse files Browse the repository at this point in the history
Forgot to change from Error::Simple to Oops exception.

git-svn-id: http://svn.foswiki.org/trunk@13915 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Feb 4, 2012
1 parent 5becb8f commit 1d59f3a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions UnitTestContrib/test/unit/RegisterTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -911,9 +911,14 @@ sub verify_rejectEvilContent {
}
catch Foswiki::OopsException with {
my $e = shift;
#$this->assert_matches(
# /Invalid Organization/,
# $e->stringify
#);
$this->assert_str_equals( "attention", $e->{template},
$e->stringify() );
$this->assert_str_equals( "bad_password", $e->{def}, $e->stringify() );
$this->assert_str_equals( "Organization", $e->{params}[0], $e->stringify() );
$this->assert_str_equals( "invalid_field", $e->{def}, $e->stringify() );
$this->assert_equals( 0, scalar(@FoswikiFnTestCase::mails) );
@FoswikiFnTestCase::mails = ();
}
Expand All @@ -923,10 +928,7 @@ sub verify_rejectEvilContent {
}
catch Error::Simple with {
my $e = shift;
$this->assert_equals(
'Invalid Organization',
substr( $e->stringify, 0, 20 )
);
$this->assert( 0, $e->stringify );
}
otherwise {
$this->assert( 0, "expected an oops redirect" );
Expand Down

0 comments on commit 1d59f3a

Please sign in to comment.