Found a log file full of IAEs from ModelObjectWithContextMenu.MenuItem due to an (unknown) action with an illegal absolute URI.

This commit is contained in:
Jesse Glick committed 2013-02-04 18:11:12 -05:00
1 parent ef612da95d
commit f9da4a867e
2 files changed
+18 -4

No files matched your search

@@ -100,6 +100,12 @@ public class FunctionsTest {
}
}
@Test
@PrepareForTest(Stapler.class)
public void testGetActionUrl_unparsable() throws Exception{
assertEquals(null, Functions.getActionUrl(null, createMockAction("http://nowhere.net/stuff?something=^woohoo")));
}
private static Action createMockAction(String uri) {
Action action = mock(Action.class);
when(action.getUrlName()).thenReturn(uri);