Skip to content

Commit

Permalink
๐Ÿ› Fix: ๋กœ๊ทธ์ธ ์™„๋ฃŒ ์‹œ ๋ฉ”์ธ ํŽ˜์ด์ง€๋กœ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ ๋˜๋„๋ก ์ˆ˜์ • (#8)
Browse files Browse the repository at this point in the history
* โœจ ์นด์นด์˜ค ๋กœ๊ทธ์ธ/ํšŒ์›๊ฐ€์ž… ๊ตฌํ˜„ (#3)

* Style: codeStyle ์ถ”๊ฐ€

* Feat: Member, Profile Entity, MemberRepository ์ถ”๊ฐ€

+ MemberRepositoryTest ์ถ”๊ฐ€

Related to: #1

* Feat: ์นด์นด์˜ค ๋กœ๊ทธ์ธ, ํšŒ์›๊ฐ€์ž… ๊ธฐ๋Šฅ ์ถ”๊ฐ€

- ๊ถŒํ•œ ํ•„์š”ํ•œ API ์ ‘์† ์‹œ ์นด์นด์˜ค ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ ๋ฐ˜ํ™˜
  - ๋กœ๊ทธ์ธ ์„ฑ๊ณต ์‹œ ๊ฐ€์ž…์ด ์•ˆ๋˜์–ด์žˆ์œผ๋ฉด ๊ฐ€์ž…, ๋˜์–ด์žˆ์œผ๋ฉด ๊ถŒํ•œ ๋ถ€์—ฌ
  - ๊ถŒํ•œ์€ JWT ๋ฐœ๊ธ‰ ํ›„ ์ฟ ํ‚ค์— ์ถ”๊ฐ€, ๋งค ์š”์ฒญ๋งˆ๋‹ค JwtFilter๋ฅผ ๊ฑฐ์น˜๋ฉฐ ์ฟ ํ‚ค์˜ Jwt ํ™•

Related to: #1

* Style: ์ฝ”๋“œ ํฌ๋งท, ๋น„๋ฐ€๋ฒˆํ˜ธ ๋…ธ์ถœ ๋“ฑ ์ˆ˜์ •

Related to: #1

* โœจ /api/auth/member API ๊ธฐ๋Šฅ ์ถ”๊ฐ€ (#4)

* Feat: Member DB ์ˆ˜์ •

- ํ•œ๊ธ€์ด๋ฆ„, ์˜์–ด์ด๋ฆ„, ๊ธฐ์ˆ˜, ๊ณผ์ • ์ถ”๊ฐ€
- ๊ณผ์ • ํ‘œํ˜„ํ•˜๋Š” Enumerate ์ถ”๊ฐ€
- ์ˆ˜์ •์— ๋”ฐ๋ฅธ ์˜ค๋ฅ˜ ์ˆ˜์ •
  - getNickname -> getKoreaName of getEnglishName

Related to: #2

* Rename: Member DB Field ์ด๋ฆ„ ๋ณ€๊ฒฝ

Related to: #2

* Feat: /api/auth/member ๊ด€๋ จ DTO ์ž‘์„ฑ

Related to: #2

* Feat: /api/auth/member API ๊ด€๋ จ DTO ๋‚ด์šฉ ์ถ”๊ฐ€

Related to: #2

* Feat: /api/auth/member ๊ด€๋ จ MemberService ์ถ”๊ฐ€

Related to: #2

* Feat: /api/auth/member ๊ด€๋ จ MemberContoller ์ถ”๊ฐ€

Related to: #2

* Feat: CORS Error ์ˆ˜์ •

Related to: #2

* Fix: RefreshToken ๋งค๋ฒˆ ์ƒ์„ฑ ์˜ค๋ฅ˜ ์ˆ˜์ •

Related to: #2

* Refactor: ์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋‚ด์šฉ ๋ฐ˜์˜

- ๋ถˆํ•„์š” ์ฝ”๋“œ ์‚ญ์ œ
- ๋ฐ˜ํ™˜๊ฐ’ ์˜ค๋ฅ˜ ์ˆ˜์ •

Related to: #2

* Chore: DB๋ฅผ MariaDB -> H2๋กœ ๋ณ€๊ฒฝ

Ralted to: #5

* Test: Test์šฉ application ์ถ”๊ฐ€

Related to: #5

* ๐Ÿ› Fix: ๋กœ๊ทธ์ธ ์™„๋ฃŒ ์‹œ ๋ฉ”์ธ ํŽ˜์ด์ง€๋กœ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ ๋˜๋„๋ก ์ˆ˜์ • (#7)

* Feat: Member DB ์ˆ˜์ •

- ํ•œ๊ธ€์ด๋ฆ„, ์˜์–ด์ด๋ฆ„, ๊ธฐ์ˆ˜, ๊ณผ์ • ์ถ”๊ฐ€
- ๊ณผ์ • ํ‘œํ˜„ํ•˜๋Š” Enumerate ์ถ”๊ฐ€
- ์ˆ˜์ •์— ๋”ฐ๋ฅธ ์˜ค๋ฅ˜ ์ˆ˜์ •
  - getNickname -> getKoreaName of getEnglishName

Related to: #2

* Rename: Member DB Field ์ด๋ฆ„ ๋ณ€๊ฒฝ

Related to: #2

* Feat: /api/auth/member ๊ด€๋ จ DTO ์ž‘์„ฑ

Related to: #2

* Feat: /api/auth/member API ๊ด€๋ จ DTO ๋‚ด์šฉ ์ถ”๊ฐ€

Related to: #2

* Feat: /api/auth/member ๊ด€๋ จ MemberService ์ถ”๊ฐ€

Related to: #2

* Feat: /api/auth/member ๊ด€๋ จ MemberContoller ์ถ”๊ฐ€

Related to: #2

* Feat: CORS Error ์ˆ˜์ •

Related to: #2

* Fix: RefreshToken ๋งค๋ฒˆ ์ƒ์„ฑ ์˜ค๋ฅ˜ ์ˆ˜์ •

Related to: #2

* Refactor: ์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋‚ด์šฉ ๋ฐ˜์˜

- ๋ถˆํ•„์š” ์ฝ”๋“œ ์‚ญ์ œ
- ๋ฐ˜ํ™˜๊ฐ’ ์˜ค๋ฅ˜ ์ˆ˜์ •

Related to: #2

* Test: MemberRepository Test ์ฝ”๋“œ ์ถ”๊ฐ€

Related to: #2

* Chore: Test์šฉ application yml ์ถ”๊ฐ€

Related to: #2

* ์นด์นด์˜ค ํšŒ์›๊ฐ€์ž…/๋กœ๊ทธ์ธ, /api/auth/member API ๊ธฐ๋Šฅ ์ถ”๊ฐ€ (#6)

* โœจ ์นด์นด์˜ค ๋กœ๊ทธ์ธ/ํšŒ์›๊ฐ€์ž… ๊ตฌํ˜„ (#3)

* Style: codeStyle ์ถ”๊ฐ€

* Feat: Member, Profile Entity, MemberRepository ์ถ”๊ฐ€

+ MemberRepositoryTest ์ถ”๊ฐ€

Related to: #1

* Feat: ์นด์นด์˜ค ๋กœ๊ทธ์ธ, ํšŒ์›๊ฐ€์ž… ๊ธฐ๋Šฅ ์ถ”๊ฐ€

- ๊ถŒํ•œ ํ•„์š”ํ•œ API ์ ‘์† ์‹œ ์นด์นด์˜ค ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ ๋ฐ˜ํ™˜
  - ๋กœ๊ทธ์ธ ์„ฑ๊ณต ์‹œ ๊ฐ€์ž…์ด ์•ˆ๋˜์–ด์žˆ์œผ๋ฉด ๊ฐ€์ž…, ๋˜์–ด์žˆ์œผ๋ฉด ๊ถŒํ•œ ๋ถ€์—ฌ
  - ๊ถŒํ•œ์€ JWT ๋ฐœ๊ธ‰ ํ›„ ์ฟ ํ‚ค์— ์ถ”๊ฐ€, ๋งค ์š”์ฒญ๋งˆ๋‹ค JwtFilter๋ฅผ ๊ฑฐ์น˜๋ฉฐ ์ฟ ํ‚ค์˜ Jwt ํ™•

Related to: #1

* Style: ์ฝ”๋“œ ํฌ๋งท, ๋น„๋ฐ€๋ฒˆํ˜ธ ๋…ธ์ถœ ๋“ฑ ์ˆ˜์ •

Related to: #1

* โœจ /api/auth/member API ๊ธฐ๋Šฅ ์ถ”๊ฐ€ (#4)

* Feat: Member DB ์ˆ˜์ •

- ํ•œ๊ธ€์ด๋ฆ„, ์˜์–ด์ด๋ฆ„, ๊ธฐ์ˆ˜, ๊ณผ์ • ์ถ”๊ฐ€
- ๊ณผ์ • ํ‘œํ˜„ํ•˜๋Š” Enumerate ์ถ”๊ฐ€
- ์ˆ˜์ •์— ๋”ฐ๋ฅธ ์˜ค๋ฅ˜ ์ˆ˜์ •
  - getNickname -> getKoreaName of getEnglishName

Related to: #2

* Rename: Member DB Field ์ด๋ฆ„ ๋ณ€๊ฒฝ

Related to: #2

* Feat: /api/auth/member ๊ด€๋ จ DTO ์ž‘์„ฑ

Related to: #2

* Feat: /api/auth/member API ๊ด€๋ จ DTO ๋‚ด์šฉ ์ถ”๊ฐ€

Related to: #2

* Feat: /api/auth/member ๊ด€๋ จ MemberService ์ถ”๊ฐ€

Related to: #2

* Feat: /api/auth/member ๊ด€๋ จ MemberContoller ์ถ”๊ฐ€

Related to: #2

* Feat: CORS Error ์ˆ˜์ •

Related to: #2

* Fix: RefreshToken ๋งค๋ฒˆ ์ƒ์„ฑ ์˜ค๋ฅ˜ ์ˆ˜์ •

Related to: #2

* Refactor: ์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋‚ด์šฉ ๋ฐ˜์˜

- ๋ถˆํ•„์š” ์ฝ”๋“œ ์‚ญ์ œ
- ๋ฐ˜ํ™˜๊ฐ’ ์˜ค๋ฅ˜ ์ˆ˜์ •

Related to: #2

* Chore: DB๋ฅผ MariaDB -> H2๋กœ ๋ณ€๊ฒฝ

Ralted to: #5

* Test: Test์šฉ application ์ถ”๊ฐ€

Related to: #5

* Feat: ๊นƒํ—ˆ๋ธŒ ์•ก์…˜ ์ž‘์„ฑ

Related to: #5

* Feat: ๋„์ปค ํŒŒ์ผ ์ž‘์„ฑ

Related to: #5

* Feat: ํ…Œ์ŠคํŠธ์šฉ ๋„์ปค ์ปดํฌ์ฆˆ ํŒŒ์ผ ์ž‘์„ฑ

Related to: #5

* Refactor: import ์ถ”๊ฐ€

* Fix: ๊นƒํ—ˆ๋ธŒ ์•ก์…˜ ์˜คํƒ€ ์ˆ˜์ •

Related to: #5

* Feat: SSL ์ ์šฉ

* Fix: SSL ์ˆ˜์ •

* Fix: SSL ์ˆ˜์ •

์Šคํฌ๋ฆฝํŠธ ์ˆ˜์ •

* Fix: SSL ์Šคํฌ๋ฆฝํŠธ ์ˆ˜์ •

* Fix: SSL ์Šคํฌ๋ฆฝํŠธ ์ˆ˜์ •

* Feat: ์นด์นด์˜ค ๋กœ๊ทธ์ธ ์™„๋ฃŒ ์‹œ ๋ฉ”์ธ ํŽ˜์ด์ง€๋กœ redirect

Related to: #1

---------

Co-authored-by: ๋ฐ•์ง€ํ˜ <[email protected]>

---------

Co-authored-by: ๋ฐ•์ง€ํ˜ <[email protected]>
  • Loading branch information
Taejin1221 and pjh5365 authored Sep 8, 2024
1 parent 26b9781 commit 08723ef
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ gradle-app.setting
# Java heap dump
*.hprof


# End of https://www.toptal.com/developers/gitignore/api/java,gradle,macos,intellij+allauth.yml
oauth.yml
database.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import static org.junit.jupiter.api.Assertions.*;

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

import org.junit.jupiter.api.DisplayName;
Expand All @@ -11,6 +13,7 @@
import org.springframework.test.context.ActiveProfiles;
import org.springframework.transaction.annotation.Transactional;

import kaboo.kaboo_auth.domain.Course;
import kaboo.kaboo_auth.domain.entity.Member;

@DataJpaTest
Expand Down Expand Up @@ -60,4 +63,66 @@ void findByUsername_Failure() {
// Then
assertEquals(result, Optional.empty());
}

@Test
@DisplayName("DB์— ์กด์žฌํ•˜๋Š” classNum ์ฐพ์„ ๋•Œ findByClassNum method ํ…Œ์ŠคํŠธ")
void findByClassNum_Success() {
// Given
Member member1 = Member.builder().englishName("Alice").classNum(1).build();
Member member2 = Member.builder().englishName("Bob").classNum(1).build();

memberRepository.save(member1);
memberRepository.save(member2);

List<Member> expectedMembers = Arrays.asList(member1, member2);

// When
List<Member> byClassNum = memberRepository.findByClassNum(1);

// Then
assertEquals(byClassNum.size(), 2, "๋ฆฌ์ŠคํŠธ์˜ ํฌ๊ธฐ๊ฐ€ ๋‹ค๋ฆ…๋‹ˆ๋‹ค.");
assertTrue(byClassNum.containsAll(expectedMembers), "๋ฆฌ์ŠคํŠธ์— ๋ชจ๋“  ๋ฉค๋ฒ„๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.");
}

@Test
@DisplayName("DB์— ์กด์žฌํ•˜์ง€ ์•Š๋Š” classNum ์ฐพ์„ ๋•Œ findByClassNum method ํ…Œ์ŠคํŠธ")
void findByClassNum_Failure() {
// Given

// When
List<Member> byClassNum = memberRepository.findByClassNum(1);

// Then
assertEquals(byClassNum.size(), 0);
}

@Test
@DisplayName("findByKoreaName ์„ฑ๊ณต ํ…Œ์ŠคํŠธ")
void findByKoreaName_Success() {
// Given
Member member = Member.builder()
.koreaName("ํ™๊ธธ๋™")
.classNum(1)
.course(Course.AI)
.build();
memberRepository.save(member);

// When
Optional<Member> byKoreaName = memberRepository.findByKoreaName("ํ™๊ธธ๋™");

// Then
assertEquals(byKoreaName.get(), member);
}

@Test
@DisplayName("findByKoreaName ์‹คํŒจ ํ…Œ์ŠคํŠธ")
void findByKoreaName_Failure() {
// Given

// When
Optional<Member> byKoreaName = memberRepository.findByKoreaName("ํ™๊ธธ๋™");

// Then
assertTrue(byKoreaName.isEmpty());
}
}

0 comments on commit 08723ef

Please sign in to comment.