DATAREST-668 - Added test case to verify search links are created correctly.
Added a test case that explictly verifies the projection template variable being added to search links for domain types with projections registered. Related tickets: DATAREST-467, DATAREST-519.
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user