Skip to content

Commit

Permalink
refactor: member api 응답 보완 (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
alstn113 authored Aug 7, 2024
1 parent f678b8b commit 9c6ab68
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/src/test/java/develup/api/MemberApiTest.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package develup.api;

import static org.hamcrest.Matchers.equalTo;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

import develup.application.member.MemberResponse;
Expand Down Expand Up @@ -43,6 +45,10 @@ void getMyInfo() throws Exception {
.cookie(new Cookie("token", "mock_token"))
)
.andDo(print())
.andExpect(status().isOk());
.andExpect(status().isOk())
.andExpect(jsonPath("$.data.id", equalTo(1)))
.andExpect(jsonPath("$.data.email", equalTo("[email protected]")))
.andExpect(jsonPath("$.data.name", equalTo("example")))
.andExpect(jsonPath("$.data.imageUrl", equalTo("https://example.com/image.png")));
}
}

0 comments on commit 9c6ab68

Please sign in to comment.