Skip to content

Commit 605c365

Browse files
committed
test: follow 테스트 수정
유저 2명이 존재하고 팔로우를 안해서 실패하면 FollowNotFoundException
1 parent 60b4f5d commit 605c365

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/test/java/com/example/log4u/domain/follow/FollowTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void deleteFollowSuccess() {
6868
Long userId = saveOneFollow();
6969

7070
followService.deleteFollow(userId, TARGET);
71-
71+
7272
assertThrows(FollowNotFoundException.class,
7373
() -> followService.deleteFollow(userId, TARGET));
7474
}
@@ -81,8 +81,11 @@ void deleteFollowFailureWithFollowNotFound() {
8181
user = userRepository.save(user);
8282
final Long userId = user.getUserId();
8383

84+
User target = UserFixture.createUserFixtureWithNickname(TARGET);
85+
userRepository.save(target);
86+
8487
assertThrows(FollowNotFoundException.class,
85-
() -> followService.deleteFollow(userId, WRONG_TARGET));
88+
() -> followService.deleteFollow(userId, TARGET));
8689
}
8790

8891
private Long saveOneFollow() {

0 commit comments

Comments
 (0)