提交 fe3aad4a 编写于 作者: J Juergen Hoeller

Latest dependency updates (H2 1.4.189, Underscore.js 1.8.3)

上级 cffad9d4
......@@ -18,7 +18,7 @@ ext {
linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-framework.git'
linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-framework.git'
moduleProjects = subprojects.findAll {
moduleProjects = subprojects.findAll {
!it.name.equals('spring-build-src') && !it.name.equals('spring-framework-bom')
}
}
......@@ -141,7 +141,7 @@ configure(allprojects) { project ->
testCompile("org.hamcrest:hamcrest-all:${hamcrestVersion}")
sniffer("org.codehaus.mojo:animal-sniffer-ant-tasks:${snifferVersion}")
javaApiSignature("org.codehaus.mojo.signature:java16:1.1@signature") // as from JDK 6 update 18
javaApiSignature("org.codehaus.mojo.signature:java16:1.1@signature") // API level from JDK 6 update 18
}
task copyJavaApiSignature(type: Copy) {
......@@ -628,7 +628,7 @@ project("spring-jdbc") {
optional("javax.transaction:javax.transaction-api:${jtaVersion}")
optional("com.mchange:c3p0:0.9.5.1")
optional("org.hsqldb:hsqldb:${hsqldbVersion}")
optional("com.h2database:h2:1.4.188")
optional("com.h2database:h2:1.4.189")
optional("org.apache.derby:derby:10.11.1.1")
optional("org.apache.derby:derbyclient:10.11.1.1")
}
......@@ -937,7 +937,7 @@ project("spring-webmvc") {
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
testCompile("org.jruby:jruby:${jrubyVersion}")
testCompile("org.python:jython-standalone:2.5.3")
testCompile("org.webjars:underscorejs:1.8.2")
testCompile("org.webjars:underscorejs:1.8.3")
}
}
......
......@@ -16,16 +16,8 @@
package org.springframework.web.servlet.resource;
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import java.util.Collections;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.junit.Before;
......@@ -35,6 +27,13 @@ import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.mock.web.test.MockHttpServletRequest;
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
/**
* Unit tests for
* {@link org.springframework.web.servlet.resource.WebJarsResourceResolver}.
......@@ -51,6 +50,7 @@ public class WebJarsResourceResolverTests {
private HttpServletRequest request = new MockHttpServletRequest();
@Before
public void setup() {
// for this to work, an actual WebJar must be on the test classpath
......@@ -59,6 +59,7 @@ public class WebJarsResourceResolverTests {
this.chain = mock(ResourceResolverChain.class);
}
@Test
public void resolveUrlExisting() {
this.locations = Collections.singletonList(new ClassPathResource("/META-INF/resources/webjars/", getClass()));
......@@ -87,7 +88,7 @@ public class WebJarsResourceResolverTests {
@Test
public void resolveUrlWebJarResource() {
String file = "/underscorejs/underscore.js";
String expected = "/underscorejs/1.8.2/underscore.js";
String expected = "/underscorejs/1.8.3/underscore.js";
given(this.chain.resolveUrlPath(file, this.locations)).willReturn(null);
given(this.chain.resolveUrlPath(expected, this.locations)).willReturn(expected);
......@@ -139,7 +140,7 @@ public class WebJarsResourceResolverTests {
public void resolveResourceWebJar() {
Resource expected = mock(Resource.class);
String file = "/underscorejs/underscore.js";
String expectedPath = "/underscorejs/1.8.2/underscore.js";
String expectedPath = "/underscorejs/1.8.3/underscore.js";
this.locations = Collections.singletonList(new ClassPathResource("/META-INF/resources/webjars/", getClass()));
given(this.chain.resolveResource(this.request, expectedPath, this.locations)).willReturn(expected);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册