Skip to content

Commit

Permalink
Merge pull request #41 from inhooo00/feature/gradle
Browse files Browse the repository at this point in the history
Test(#20): yml 파일 적용 코드 추가
  • Loading branch information
inhooo00 authored Jul 23, 2024
2 parents ab907c2 + b5860dc commit 721eee0
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package shop.kkeujeok.kkeujeokbackend.auth.api;

import org.springframework.test.context.ActiveProfiles;

@ActiveProfiles("test")
public class AuthControllerTest {
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.test.context.ActiveProfiles;
import shop.kkeujeok.kkeujeokbackend.auth.api.dto.response.MemberLoginResDto;
import shop.kkeujeok.kkeujeokbackend.auth.api.dto.response.UserInfo;
import shop.kkeujeok.kkeujeokbackend.global.entity.Status;
Expand All @@ -23,6 +24,7 @@
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.*;

@ActiveProfiles("test")
@ExtendWith(MockitoExtension.class)
class AuthMemberServiceTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.test.context.ActiveProfiles;

import java.util.Arrays;
import java.util.List;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when;

@ActiveProfiles("test")
@ExtendWith(MockitoExtension.class)
class AuthServiceFactoryTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.test.context.ActiveProfiles;
import shop.kkeujeok.kkeujeokbackend.auth.api.dto.request.RefreshTokenReqDto;
import shop.kkeujeok.kkeujeokbackend.auth.api.dto.response.MemberLoginResDto;
import shop.kkeujeok.kkeujeokbackend.global.jwt.TokenProvider;
Expand All @@ -24,6 +25,7 @@
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.*;

@ActiveProfiles("test")
@ExtendWith(MockitoExtension.class)
class TokenServiceTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.test.context.ActiveProfiles;
import shop.kkeujeok.kkeujeokbackend.global.jwt.api.dto.TokenDto;
import java.security.Key;
import static org.assertj.core.api.Assertions.assertThat;

@ActiveProfiles("test")
public class TokenProviderTest {

private final String accessTokenExpireTime = "3600";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.test.context.ActiveProfiles;
import shop.kkeujeok.kkeujeokbackend.member.domain.Member;

import static org.assertj.core.api.Assertions.assertThat;

@ActiveProfiles("test")
public class TokenTest {
@DisplayName("refresh token을 교체한다.")
@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package shop.kkeujeok.kkeujeokbackend.global.oauth;

import org.springframework.test.context.ActiveProfiles;

@ActiveProfiles("test")
public class GoogleAuthServiceTest {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package shop.kkeujeok.kkeujeokbackend.global.oauth;

import org.springframework.test.context.ActiveProfiles;

@ActiveProfiles("test")
public class KakaoAuthServiceTest {
}

0 comments on commit 721eee0

Please sign in to comment.