diff --git a/src/test/java/org/tynamo/security/TapestrySecurityIntegrationTest.java b/src/test/java/org/tynamo/security/TapestrySecurityIntegrationTest.java index b2b54df..cf1462d 100644 --- a/src/test/java/org/tynamo/security/TapestrySecurityIntegrationTest.java +++ b/src/test/java/org/tynamo/security/TapestrySecurityIntegrationTest.java @@ -239,7 +239,7 @@ public void testUserFilterWithAjaxDeny() throws Exception Page jsonLoginResponse = webClient.getPage(ajaxRequest); String ajaxLoginResp = jsonLoginResponse.getWebResponse().getContentAsString(); - JSONObject jsonResp = new JSONObject(ajaxLoginResp); + JSONObject jsonResp = new JSONObject(ajaxLoginResp).getJSONObject("_tapestry"); String ajaxRedirectUrl = jsonResp.getString("redirectURL"); assertTrue(ajaxRedirectUrl.startsWith(APP_CONTEXT + "security/login"), "The ajax redirect response '" + ajaxRedirectUrl + "' did not start with '" + APP_CONTEXT + "security/login'");