From 1ab6fa48da1de4438831a45b8a1cfc7de97e2760 Mon Sep 17 00:00:00 2001 From: CHO CHAN HEE Date: Wed, 1 Mar 2023 17:05:14 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/bbaemin/api/user/service/UserServiceTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bbaemin-api/src/test/java/org/bbaemin/api/user/service/UserServiceTest.java b/bbaemin-api/src/test/java/org/bbaemin/api/user/service/UserServiceTest.java index 15ac8a9..5409fdb 100644 --- a/bbaemin-api/src/test/java/org/bbaemin/api/user/service/UserServiceTest.java +++ b/bbaemin-api/src/test/java/org/bbaemin/api/user/service/UserServiceTest.java @@ -77,8 +77,7 @@ void getUser() { User saved = userRepository.save(user); // when - User findUser = userRepository.findById(saved.getUserId()) - .orElseThrow(NoSuchElementException::new); + User findUser = userService.getUser(saved.getUserId()); // then Field[] fields = User.class.getDeclaredFields(); for (Field field : fields) { @@ -110,7 +109,7 @@ void join() { .phoneNumber("010-1234-5678") .role(Role.USER) .build(); - User saved = userRepository.save(user); + User saved = userService.join(user); // then User findUser = userRepository.findById(saved.getUserId())