mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-23 22:50:51 +08:00
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