diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/support/RepositoryEntityLinksIntegrationTests.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/support/RepositoryEntityLinksIntegrationTests.java index 7def69de3..09d12b42c 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/support/RepositoryEntityLinksIntegrationTests.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/support/RepositoryEntityLinksIntegrationTests.java @@ -174,4 +174,17 @@ public class RepositoryEntityLinksIntegrationTests extends AbstractControllerInt UriComponents components = UriComponentsBuilder.fromUriString(link.getHref()).build(); assertThat(components.getQueryParams(), hasKey("sort")); } + + /** + * @see DATAREST-668 + * @see DATAREST-519 + * @see DATAREST-467 + */ + @Test + public void addsProjectVariableToSearchResourceIfAvailable() { + + for (Link link : entityLinks.linksToSearchResources(Book.class)) { + assertThat(link.getVariableNames(), hasItem("projection")); + } + } }