mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-23 14:40:49 +08:00
Add endpoint to list reaction types
This commit is contained in:
@@ -17,6 +17,7 @@ import org.springframework.test.web.servlet.MockMvc;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@@ -70,4 +71,11 @@ class ReactionControllerTest {
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.commentId").value(2));
|
||||
}
|
||||
|
||||
@Test
|
||||
void listReactionTypes() throws Exception {
|
||||
mockMvc.perform(get("/api/reaction-types"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$[0]").value("LIKE"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user