Merge pull request #158 from nagisa77/codex/fix-usercontrollertest-null-pointer-exception

Fix user replies test to set post category
This commit is contained in:
Tim
2025-07-10 00:16:49 +08:00
committed by GitHub

View File

@@ -114,6 +114,9 @@ class UserControllerTest {
user.setUsername("bob");
com.openisle.model.Post post = new com.openisle.model.Post();
post.setId(5L);
com.openisle.model.Category cat = new com.openisle.model.Category();
cat.setName("tech");
post.setCategory(cat);
com.openisle.model.Comment comment = new com.openisle.model.Comment();
comment.setId(4L);
comment.setContent("hi");