-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from gunsight1/feature_add_account_type
feature :: 회원가입, 로그인시 계정 타입 추가
- Loading branch information
Showing
10 changed files
with
48 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
module-api/src/main/java/com/kernel360/member/enumset/AccountType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.kernel360.member.enumset; | ||
|
||
public enum AccountType { | ||
PLATFORM, KAKAO, NAVER, GOOGLE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
import com.kernel360.auth.service.AuthService; | ||
import com.kernel360.member.dto.MemberDto; | ||
import com.kernel360.member.entity.Member; | ||
import com.kernel360.member.enumset.AccountType; | ||
import com.kernel360.member.repository.MemberRepository; | ||
import com.kernel360.utils.ConvertSHA256; | ||
import com.kernel360.utils.JWT; | ||
|
@@ -87,7 +88,7 @@ public void init() { | |
MemberDto loginDto = MemberDto.of("test03", "1234qwer"); | ||
Member mockLoginEntity = Member.loginMember(loginDto.id(), loginDto.password()); | ||
Member mockEntity = Member.of(502L, loginDto.id(), "[email protected]", | ||
"0eb9de69892882d54516e03e30098354a2e39cea36adab275b6300c737c942fd", 0, 0); | ||
"0eb9de69892882d54516e03e30098354a2e39cea36adab275b6300c737c942fd", 0, 0, AccountType.PLATFORM.name()); | ||
String mockToken = "dummy_token"; | ||
|
||
/** stub **/ | ||
|
@@ -111,7 +112,7 @@ public void init() { | |
void 토큰_발급_저장_테스트() { | ||
|
||
/** given **/ | ||
Member memberEntity = Member.of(502L, "test03", null, null, 0, 0); | ||
Member memberEntity = Member.of(502L, "test03", null, null, 0, 0, AccountType.PLATFORM.name()); | ||
String mockToken = "mockToken"; | ||
Auth auth = Auth.jwt(null, 502L, mockToken); | ||
MockHttpServletRequest request = new MockHttpServletRequest(); | ||
|
@@ -143,7 +144,7 @@ public void init() { | |
|
||
/** given **/ | ||
String id = "test01"; | ||
Member memberEntity = Member.of(51L, "test01", null, null, 0, 0); | ||
Member memberEntity = Member.of(51L, "test01", null, null, 0, 0, AccountType.PLATFORM.name()); | ||
|
||
/** stub **/ | ||
when(memberRepository.findOneById(anyString())).thenReturn(memberEntity); | ||
|
@@ -182,7 +183,7 @@ public void init() { | |
|
||
/** given **/ | ||
String email = "[email protected]"; | ||
Member memberEntity = Member.of(51L, "test01", "[email protected]", null, 0, 0); | ||
Member memberEntity = Member.of(51L, "test01", "[email protected]", null, 0, 0, AccountType.PLATFORM.name()); | ||
|
||
/** stub **/ | ||
when(memberRepository.findOneByEmail(anyString())).thenReturn(memberEntity); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters