Skip to content

Commit

Permalink
Item11443: Unit tests need to reflect validations
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@13660 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Jan 16, 2012
1 parent 27d311c commit 9eaa3a6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CommentPlugin/test/unit/CommentPlugin/CommentPluginTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,19 @@ qr/<input ([^>]*name="endPoint" value="$this->{test_web}.WebPreferences".*?)\s*\
$html
);

# If requested topic missing, redirect to the target topic.
# If requested topic missing, return an error to the user.
$html = Foswiki::Func::expandCommonVariables(
"%COMMENT{type=\"bottom\" target=\"$this->{test_web}.ATopic#AAnchor\" redirectto=\"MissingAnRE\"}%"
);

# If requested target web is missing, return an error to the user.
$html = Foswiki::Func::expandCommonVariables(
"%COMMENT{type=\"bottom\" target=\"$this->{test_web}MISSING.ATopic#AAnchor\" }%"
);

$this->assert_matches(
qr/<input ([^>]*name="endPoint" value="$this->{test_web}.ATopic".*?)\s*\/>/,

qr/<span class='foswikiAlert'> Target web does not exist: '$this->{test_web}MISSING' <\/span>/,
$html
);

Expand Down

0 comments on commit 9eaa3a6

Please sign in to comment.