Navigation Menu

Skip to content

Commit

Permalink
Item14339: Fix unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Mar 14, 2017
1 parent 87ed305 commit 91ce45d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions UnitTestContrib/test/unit/Fn_SCRIPTURL.pm
Expand Up @@ -111,7 +111,9 @@ sub test_SCRIPTURL_rest {
"%SCRIPTURLPATH{\"rest\" subject=\"Weeble\" verb=\"wobble\" topic=\"Main.WebHome\" web=\"System\"}%"
);
$this->assert_str_equals(
"/bin/rest.dot/Weeble/wobble?topic=Main.WebHome;web=System", $result );
"$Foswiki::cfg{ScriptUrlPath}/rest.dot/Weeble/wobble?topic=Main.WebHome;web=System",
$result
);
}

sub test_SCRIPTURL_jsonrpc {
Expand All @@ -134,22 +136,26 @@ sub test_SCRIPTURL_jsonrpc {
"%SCRIPTURLPATH{\"jsonrpc\" namespace=\"Weeble\" topic=\"Main.WebHome\" web=\"System\"}%"
);
$this->assert_str_equals(
"/bin/jsonrpc.dot/Weeble?topic=Main.WebHome;web=System", $result );
"$Foswiki::cfg{ScriptUrlPath}/jsonrpc.dot/Weeble?topic=Main.WebHome;web=System",
$result
);

$result =
$this->{test_topicObject}->expandMacros(
"%SCRIPTURLPATH{\"jsonrpc\" namespace=\"Weeble\" method=\"wobble\" topic=\"Main.WebHome\" web=\"System\"}%"
);
$this->assert_str_equals(
"/bin/jsonrpc.dot/Weeble/wobble?topic=Main.WebHome;web=System",
$result );
"$Foswiki::cfg{ScriptUrlPath}/jsonrpc.dot/Weeble/wobble?topic=Main.WebHome;web=System",
$result
);

$result =
$this->{test_topicObject}->expandMacros(
"%SCRIPTURLPATH{\"jsonrpc\" namespace=\"Weeble\" method=\"wobble\" topic=\"Main.WebHome\" web=\"System\"}%"
);
$this->assert_str_equals(
"/bin/jsonrpc.dot/Weeble/wobble?topic=Main.WebHome;web=System",
$result );
"$Foswiki::cfg{ScriptUrlPath}/jsonrpc.dot/Weeble/wobble?topic=Main.WebHome;web=System",
$result
);
}
1;

0 comments on commit 91ce45d

Please sign in to comment.