mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-22 22:21:09 +08:00
Merge pull request #36 from nagisa77/codex/update-post-endpoint-for-theme-filtering-and-pagination
Add post listing filters and pagination
This commit is contained in:
@@ -81,7 +81,8 @@ class PostControllerTest {
|
||||
post.setCreatedAt(LocalDateTime.now());
|
||||
post.setAuthor(user);
|
||||
post.setCategory(cat);
|
||||
Mockito.when(postService.listPosts()).thenReturn(List.of(post));
|
||||
Mockito.when(postService.listPostsByCategories(Mockito.isNull(), Mockito.isNull(), Mockito.isNull()))
|
||||
.thenReturn(List.of(post));
|
||||
|
||||
mockMvc.perform(get("/api/posts"))
|
||||
.andExpect(status().isOk())
|
||||
|
||||
Reference in New Issue
Block a user