Skip to content

Commit

Permalink
feat : Owner logout 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
kkangh00n committed Jan 17, 2024
1 parent b849637 commit 75a1362
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import com.prgrms.catchtable.common.Role;
Expand Down Expand Up @@ -91,6 +93,17 @@ void loginSuccess() {
assertThat(ownerService.loginOwner(loginOwnerRequest)).isEqualTo(token);
}

@Test
@DisplayName("로그아웃이 성공하면, RefreshToken을 삭제한다.")
void logoutSuccess() {
//when
ownerService.logout(email);

//then
verify(refreshTokenService, times(1)).deleteRefreshToken(any());

}

@Test
@DisplayName("해당 이메일의 유저가 존재하지 않으면 로그인을 실패한다")
void loginFailureId() {
Expand Down

0 comments on commit 75a1362

Please sign in to comment.