Upgrade dependencies

4.0.2 -> 4.0.6 Jakarta Faces
4.0.0 -> 4.0.2 Apache MyFaces
3.1.0 -> 3.1.1 Jakarta Servlet JSP

Closes gh-1817, gh 1818
This commit is contained in:
rstoyanchev
2024-11-01 14:56:21 +00:00
parent 9352f0eb69
commit 85565a050b
2 changed files with 12 additions and 8 deletions

View File

@@ -1,13 +1,13 @@
package org.springframework.faces.webflow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.web.context.support.StaticWebApplicationContext;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class JsfAjaxHandlerTests {
private final JSFMockHelper jsfMock = new JSFMockHelper();
@@ -30,7 +30,11 @@ public class JsfAjaxHandlerTests {
@Test
public void testSendAjaxRedirect() throws Exception {
this.ajaxHandler.sendAjaxRedirectInternal("/target", this.jsfMock.request(), this.jsfMock.response(), false);
assertTrue(this.jsfMock.contentAsString().matches("<\\?xml version='1.0' encoding='utf-8'\\?>\n<partial-response.*><redirect url=\"/target\"/></partial-response>"));
assertEquals(this.jsfMock.contentAsString(), """
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><redirect url="/target"/></partial-response>""");
assertEquals("application/xml", this.jsfMock.response().getContentType());
}