Fix for ISSUE#909 (encode spaces in URLs sent by Jabber bot).

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8938 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
dwdyer committed 2008-04-28 21:18:40 +00:00
1 parent 47fa71a5f6
commit 8a4b77e4b9
1 file changed
+9
+9
View File
@@ -51,4 +51,13 @@ public class UtilTest extends TestCase {
assertEquals(Messages.Util_second(17), Util.getTimeSpanString(17000L));
}
/**
* Test that Strings that contain spaces are correctly URL encoded.
*/
public void testEncodeSpaces() {
final String urlWithSpaces = "http://hudson/job/Hudson Job";
String encoded = Util.encode(urlWithSpaces);
assertEquals(encoded, "http://hudson/job/Hudson%20Job");
}
}