This repository has been archived by the owner on Nov 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
539d424
commit 87ff694
Showing
6 changed files
with
118 additions
and
30 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
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package com.sns.user.component.user.repositories | ||
|
||
import com.sns.user.component.user.domains.Hobby | ||
import com.sns.user.component.user.domains.Profile | ||
import com.sns.user.hasValueSatisfying | ||
import com.sns.user.isEqualTo | ||
import org.junit.jupiter.api.Test | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.boot.test.context.SpringBootTest | ||
import org.springframework.transaction.annotation.Transactional | ||
|
||
/** | ||
* @author Hyounglin Jun | ||
|
@@ -16,15 +16,15 @@ internal class ProfileRepositoryTest { | |
@Autowired | ||
lateinit var profileRepository: ProfileRepository | ||
|
||
@Transactional | ||
@Test | ||
fun save() { | ||
val id = "[email protected]" | ||
val nickName = "닉네임" | ||
val inputHobbies = listOf("밥먹기", "운동하기") | ||
val outputHobbies = listOf(Hobby("밥먹기"), Hobby("운동하기")) | ||
val hobbies = listOf("밥먹기", "운동하기") | ||
val profile = Profile.create( | ||
userId = id, nickName = nickName, | ||
hobbies = inputHobbies, | ||
hobbies = hobbies, | ||
) | ||
|
||
profileRepository.save(profile) | ||
|
@@ -34,7 +34,7 @@ internal class ProfileRepositoryTest { | |
savedUser.nickName isEqualTo nickName | ||
savedUser.iconImageUrl isEqualTo null | ||
savedUser.intro isEqualTo null | ||
savedUser.hobbies isEqualTo outputHobbies | ||
savedUser.hobbies isEqualTo hobbies | ||
} | ||
} | ||
} | ||
|
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