Skip to content

Commit

Permalink
Test: add has refreshToken provider
Browse files Browse the repository at this point in the history
  • Loading branch information
emost22 committed Jul 14, 2024
1 parent 2249db5 commit eca7fba
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.sirius.spurt.store.provider.auth.impl;

import static java.lang.Boolean.TRUE;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
Expand Down Expand Up @@ -45,4 +46,17 @@ class AuthProviderImplTest implements TokenTest, UserTest {
verify(authRepository).getRefreshToken(anyString());
assertThat(authVo.getUserId()).isEqualTo(TEST_USER_ID);
}

@Test
void refreshToken_존재여부_확인_테스트() {
// given
when(authRepository.hasRefreshToken(anyString())).thenReturn(TRUE);

// when
Boolean hasRefreshToken = authProvider.hasRefreshToken(TEST_TOKEN_KEY);

// then
verify(authRepository).hasRefreshToken(anyString());
assertThat(hasRefreshToken).isEqualTo(TRUE);
}
}

0 comments on commit eca7fba

Please sign in to comment.