Upgrade to Mojarra 2.2.10
Mojarra 2.2.10 generates responses that begin with an XML declaration: <?xml version='1.0' encoding='utf-8'?> This change broke the expectation in JsfAjaxHandlerTests's testSendAjaxRedirect. The test has been updated to expect the XML declaration. ResourcesBeanDefinitionParserTests has been updated to set up and tear down the mock JDF infrastructure. This ensures that it does not leave any side-effects that cause subsequent tests to fail on some platforms.
This commit is contained in:
@@ -280,8 +280,8 @@ project("spring-faces") {
|
||||
provided("javax.el:javax.el-api:2.2.4")
|
||||
provided("javax.servlet:javax.servlet-api:3.0.1")
|
||||
provided("javax.portlet:portlet-api:2.0")
|
||||
provided("com.sun.faces:jsf-api:2.2.4")
|
||||
provided("com.sun.faces:jsf-impl:2.2.4")
|
||||
provided("com.sun.faces:jsf-api:2.2.10")
|
||||
provided("com.sun.faces:jsf-impl:2.2.10")
|
||||
provided("org.apache.myfaces.core:myfaces-impl:2.1.14")
|
||||
optional("com.sun.facelets:jsf-facelets:1.1.14")
|
||||
optional("org.springframework.security:spring-security-core:$springSecurityVersion")
|
||||
|
||||
@@ -2,9 +2,25 @@ package org.springframework.faces.config;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.faces.webflow.JSFMockHelper;
|
||||
|
||||
public class ResourcesBeanDefinitionParserTests extends AbstractResourcesConfigurationTests {
|
||||
|
||||
/**
|
||||
* JSF Mock Helper
|
||||
*/
|
||||
private final JSFMockHelper jsfMockHelper = new JSFMockHelper();
|
||||
|
||||
public void setUp() throws Exception {
|
||||
this.jsfMockHelper.setUp();
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
this.jsfMockHelper.tearDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ApplicationContext initApplicationContext() {
|
||||
|
||||
@@ -23,7 +23,7 @@ public class JsfAjaxHandlerTests extends TestCase {
|
||||
|
||||
public void testSendAjaxRedirect() throws Exception {
|
||||
this.ajaxHandler.sendAjaxRedirectInternal("/target", this.jsfMock.request(), this.jsfMock.response(), false);
|
||||
assertTrue(this.jsfMock.contentAsString().matches("<partial-response.*><redirect url=\"/target\"/></partial-response>"));
|
||||
assertTrue(this.jsfMock.contentAsString().matches("<\\?xml version='1.0' encoding='utf-8'\\?>\n<partial-response.*><redirect url=\"/target\"/></partial-response>"));
|
||||
assertEquals("application/xml", this.jsfMock.response().getContentType());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user