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:
Tim
2025-07-01 16:03:20 +08:00
committed by GitHub
4 changed files with 39 additions and 4 deletions

View File

@@ -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())