use of org.springframework.web.servlet.resource.EncodedResourceResolver.EncodedResource in project spring-framework by spring-projects.
the class CssLinkResourceTransformerTests method transformSkippedForGzippedResource.
@Test
public void transformSkippedForGzippedResource(GzippedFiles gzippedFiles) throws Exception {
gzippedFiles.create("main.css");
this.request = new MockHttpServletRequest("GET", "/static/main.css");
Resource original = new ClassPathResource("test/main.css", getClass());
EncodedResource gzipped = new EncodedResource(original, "gzip", ".gz");
Resource actual = this.transformerChain.transform(this.request, gzipped);
assertThat(actual).isSameAs(gzipped);
}
Aggregations