diff --git a/src/test/java/com/onnoff/onnoff/domain/user/service/UserServiceImplTest.java b/src/test/java/com/onnoff/onnoff/domain/user/service/UserServiceImplTest.java index 658f7aa..2585534 100644 --- a/src/test/java/com/onnoff/onnoff/domain/user/service/UserServiceImplTest.java +++ b/src/test/java/com/onnoff/onnoff/domain/user/service/UserServiceImplTest.java @@ -1,8 +1,5 @@ package com.onnoff.onnoff.domain.user.service; -import com.onnoff.onnoff.apiPayload.code.status.ErrorStatus; -import com.onnoff.onnoff.apiPayload.exception.GeneralException; -import com.onnoff.onnoff.auth.UserContext; import com.onnoff.onnoff.domain.user.User; import jakarta.transaction.Transactional; import org.assertj.core.api.Assertions; @@ -10,13 +7,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import static org.junit.jupiter.api.Assertions.assertThrows; - @SpringBootTest @Transactional class UserServiceImplTest { - private final UserService userService; public UserServiceImplTest(@Autowired UserService userService) { @@ -32,21 +26,4 @@ public UserServiceImplTest(@Autowired UserService userService) { Assertions.assertThat(user.getName()).isEqualTo(findUser.getName()); } - @Test - void 회원탈퇴() { - // 유저가 회원가입을 했고 id가 6인 상황 - - //유저 id 6인 사용자가 회원탈퇴 버튼 누름 - User user = userService.getUser(6l); - user.setUserStatusInactive(); - //한달 후에 hard delete - userService.deleteInactiveUsers(); - // 삭제 됐는지 확인 - GeneralException exception = assertThrows(GeneralException.class, () -> { - userService.getUser(6l); - }); - Assertions.assertThat(ErrorStatus.USER_NOT_FOUND).isEqualTo(exception.getCode()); - // 카카오톡 들어가서 연결된 앱에서 해지 됐는지도 확인 - } - } \ No newline at end of file