-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE] FIX: user blackhole same 로직 null 경우 추가
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 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
25 changes: 25 additions & 0 deletions
25
backend/src/test/java/org/ftclub/cabinet/user/domain/UserTest.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 |
---|---|---|
@@ -1,10 +1,35 @@ | ||
package org.ftclub.cabinet.user.domain; | ||
|
||
import java.time.LocalDateTime; | ||
import lombok.RequiredArgsConstructor; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
@RequiredArgsConstructor | ||
public class UserTest { | ||
|
||
@Test | ||
void isSameBlackholedAt_test_both_null() { | ||
User test = User.of("test", "[email protected]", null); | ||
boolean sameBlackholedAt = test.isSameBlackholedAt(null); | ||
Assertions.assertTrue(sameBlackholedAt); | ||
} | ||
|
||
@Test | ||
void isSameBlackholedAt_test_one_null() { | ||
User test = User.of("test", "[email protected]", null); | ||
boolean sameBlackholedAt = test.isSameBlackholedAt(LocalDateTime.now()); | ||
Assertions.assertFalse(sameBlackholedAt); | ||
} | ||
|
||
@Test | ||
void isSameBlackholedAt_test_same() { | ||
LocalDateTime now = LocalDateTime.now(); | ||
User test = User.of("test", "[email protected]", now); | ||
boolean sameBlackholedAt = test.isSameBlackholedAt(now); | ||
Assertions.assertTrue(sameBlackholedAt); | ||
} | ||
|
||
// @Test | ||
// @DisplayName("유저 생성 성공 - 일반적인 이메일 형식") | ||
// void of_성공_일반적인_이메일_형식() { | ||
|