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

This commit is contained in:
Juergen Hoeller
2015-09-23 22:03:08 +02:00
parent cffad9d4b1
commit fe3aad4ab2
2 changed files with 15 additions and 14 deletions

View File

@@ -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);