Skip to content

Commit b4239c8

Browse files
committed
Ref: 이메일 인증 API 경로 수정
1 parent b5176fb commit b4239c8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/com/back/domain/user/controller/AuthController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public ResponseEntity<RsData<UserResponse>> register(
3838
}
3939

4040
// 이메일 인증
41-
@GetMapping("/verify")
41+
@GetMapping("/email-verification")
4242
public ResponseEntity<RsData<UserResponse>> verifyEmail(
4343
@RequestParam("token") String token
4444
) {

src/test/java/com/back/domain/user/controller/AuthControllerTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ void verifyEmail_success() throws Exception {
240240
String token = tokenService.createEmailVerificationToken(saved.getId());
241241

242242
// when & then
243-
mvc.perform(get("/api/auth/verify").param("token", token))
243+
mvc.perform(get("/api/auth/email-verification").param("token", token))
244244
.andDo(print())
245245
.andExpect(status().isOk())
246246
.andExpect(jsonPath("$.success").value(true))
@@ -254,7 +254,7 @@ void verifyEmail_success() throws Exception {
254254
@Test
255255
@DisplayName("유효하지 않거나 만료된 토큰 → 401 Unauthorized")
256256
void verifyEmail_invalidOrExpiredToken() throws Exception {
257-
mvc.perform(get("/api/auth/verify").param("token", "fake-token"))
257+
mvc.perform(get("/api/auth/email-verification").param("token", "fake-token"))
258258
.andDo(print())
259259
.andExpect(status().isUnauthorized())
260260
.andExpect(jsonPath("$.success").value(false))
@@ -276,7 +276,7 @@ void verifyEmail_alreadyVerified() throws Exception {
276276
String token = tokenService.createEmailVerificationToken(saved.getId());
277277

278278
// when & then
279-
mvc.perform(get("/api/auth/verify").param("token", token))
279+
mvc.perform(get("/api/auth/email-verification").param("token", token))
280280
.andDo(print())
281281
.andExpect(status().isConflict())
282282
.andExpect(jsonPath("$.success").value(false))
@@ -287,7 +287,7 @@ void verifyEmail_alreadyVerified() throws Exception {
287287
@Test
288288
@DisplayName("토큰 파라미터 누락 → 400 Bad Request")
289289
void verifyEmail_missingToken() throws Exception {
290-
mvc.perform(get("/api/auth/verify"))
290+
mvc.perform(get("/api/auth/email-verification"))
291291
.andDo(print())
292292
.andExpect(status().isBadRequest())
293293
.andExpect(jsonPath("$.success").value(false))

0 commit comments

Comments
 (0)