Skip to content

Commit

Permalink
✅ Fix Test Fail by fixture monkey
Browse files Browse the repository at this point in the history
  • Loading branch information
waterfogSW committed Dec 1, 2024
1 parent 5f78efc commit 6f99e72
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import io.kotest.core.annotation.DisplayName
import io.kotest.core.spec.style.DescribeSpec
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNotBe
import java.net.URL
import java.time.Year

@DisplayName("[도메인][유저] 유저")
Expand Down Expand Up @@ -184,10 +185,17 @@ class UserTest : DescribeSpec({
.set(UserDesiredPartner::allowSameCompany, null)
.sample()

val userProfileImageUrl: URL = URL("http://example.com")
val userProfileImage = fixtureMonkey
.giveMeBuilder<UserProfileImage>()
.set(UserProfileImage::url, userProfileImageUrl)
.sampleList(1)

val user: User = fixtureMonkey
.giveMeBuilder<User>()
.set(User::name, User.Name("홍길동"))
.set(User::phoneNumber, PhoneNumber("01012345678"))
.set(User::profileImages, userProfileImage)
.set(User::desiredPartner, userDesiredPartner)
.sample()

Expand All @@ -212,11 +220,18 @@ class UserTest : DescribeSpec({
.set(UserDesiredPartner::allowSameCompany, null)
.sample()

val userProfileImageUrl: URL = URL("http://example.com")
val userProfileImage = fixtureMonkey
.giveMeBuilder<UserProfileImage>()
.set(UserProfileImage::url, userProfileImageUrl)
.sampleList(1)

val user: User = fixtureMonkey
.giveMeBuilder<User>()
.set(User::name, User.Name("홍길동"))
.set(User::phoneNumber, PhoneNumber("01012345678"))
.set(User::desiredPartner, userDesiredPartner)
.set(User::profileImages, userProfileImage)
.sample()
.putProfileWidget(profileWidget)

Expand All @@ -243,10 +258,17 @@ class UserTest : DescribeSpec({
.set(UserDesiredPartner::allowSameCompany, null)
.sample()

val userProfileImageUrl: URL = URL("http://example.com")
val userProfileImage = fixtureMonkey
.giveMeBuilder<UserProfileImage>()
.set(UserProfileImage::url, userProfileImageUrl)
.sampleList(1)

val user: User = fixtureMonkey
.giveMeBuilder<User>()
.set(User::name, User.Name("홍길동"))
.set(User::phoneNumber, PhoneNumber("01012345678"))
.set(User::profileImages, userProfileImage)
.set(User::desiredPartner, userDesiredPartner)
.sample()

Expand Down Expand Up @@ -286,9 +308,16 @@ class UserTest : DescribeSpec({
.set(UserDesiredPartner::allowSameCompany, null)
.sample()

val userProfileImageUrl: URL = URL("http://example.com")
val userProfileImage = fixtureMonkey
.giveMeBuilder<UserProfileImage>()
.set(UserProfileImage::url, userProfileImageUrl)
.sampleList(1)

val user: User = fixtureMonkey
.giveMeBuilder<User>()
.set(User::name, User.Name("홍길동"))
.set(User::profileImages, userProfileImage)
.set(User::phoneNumber, PhoneNumber("01012345678"))
.set(User::desiredPartner, userDesiredPartner)
.sample()
Expand Down

0 comments on commit 6f99e72

Please sign in to comment.