mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
DS-4269 improve IT for pagination links issue
This commit is contained in:
@@ -430,10 +430,11 @@ public class BrowsesResourceControllerIT extends AbstractControllerIntegrationTe
|
|||||||
.andExpect(jsonPath("$.page.totalPages", is(2)))
|
.andExpect(jsonPath("$.page.totalPages", is(2)))
|
||||||
.andExpect(jsonPath("$.page.number", is(0)))
|
.andExpect(jsonPath("$.page.number", is(0)))
|
||||||
// embedded items are already checked by other test, we focus on links here
|
// embedded items are already checked by other test, we focus on links here
|
||||||
.andExpect(jsonPath("$._links.next", Matchers.containsString("/api/discover/browses/title/items?")))
|
.andExpect(jsonPath("$._links.next.href", Matchers.containsString("/api/discover/browses/title/items?")))
|
||||||
.andExpect(jsonPath("$._links.last", Matchers.containsString("/api/discover/browses/title/items?")))
|
.andExpect(jsonPath("$._links.last.href", Matchers.containsString("/api/discover/browses/title/items?")))
|
||||||
.andExpect(jsonPath("$._links.first", Matchers.containsString("/api/discover/browses/title/items?")))
|
.andExpect(
|
||||||
.andExpect(jsonPath("$._links.self", Matchers.endsWith("/api/discover/browses/title/items")));
|
jsonPath("$._links.first.href", Matchers.containsString("/api/discover/browses/title/items?")))
|
||||||
|
.andExpect(jsonPath("$._links.self.href", Matchers.endsWith("/api/discover/browses/title/items")));
|
||||||
|
|
||||||
//** WHEN **
|
//** WHEN **
|
||||||
//An anonymous user browses the items in the Browse by item endpoint
|
//An anonymous user browses the items in the Browse by item endpoint
|
||||||
@@ -449,10 +450,13 @@ public class BrowsesResourceControllerIT extends AbstractControllerIntegrationTe
|
|||||||
.andExpect(jsonPath("$.page.totalPages", is(2)))
|
.andExpect(jsonPath("$.page.totalPages", is(2)))
|
||||||
.andExpect(jsonPath("$.page.number", is(0)))
|
.andExpect(jsonPath("$.page.number", is(0)))
|
||||||
// embedded items are already checked by other test, we focus on links here
|
// embedded items are already checked by other test, we focus on links here
|
||||||
.andExpect(jsonPath("$._links.next", Matchers.containsString("/api/discover/browses/author/entries?")))
|
.andExpect(jsonPath("$._links.next.href",
|
||||||
.andExpect(jsonPath("$._links.last", Matchers.containsString("/api/discover/browses/author/entries?")))
|
Matchers.containsString("/api/discover/browses/author/entries?")))
|
||||||
.andExpect(jsonPath("$._links.first", Matchers.containsString("/api/discover/browses/author/entries?")))
|
.andExpect(jsonPath("$._links.last.href",
|
||||||
.andExpect(jsonPath("$._links.self", Matchers.endsWith("/api/discover/browses/author/entries")));
|
Matchers.containsString("/api/discover/browses/author/entries?")))
|
||||||
|
.andExpect(jsonPath("$._links.first.href",
|
||||||
|
Matchers.containsString("/api/discover/browses/author/entries?")))
|
||||||
|
.andExpect(jsonPath("$._links.self.href", Matchers.endsWith("/api/discover/browses/author/entries")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user