forked from yy0ung/nibobnebob
-
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.
feat : 닉네임 중복확인, 이메일 중복확인 api 테스트 코드 구현 #35
- Loading branch information
Showing
1 changed file
with
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,6 +149,36 @@ describe("마이페이지", () => { | |
); | ||
}); | ||
|
||
it("이메일 중복 확인 요청", async () => { | ||
|
||
const firstResult = await userService.getEmailAvailability("[email protected]"); | ||
|
||
expect(firstResult).toEqual(await | ||
expect.objectContaining({ | ||
isexist: false | ||
}) | ||
); | ||
const userInfoDto: UserInfoDto = { | ||
email: "[email protected]", | ||
password: "1234", | ||
provider: " ", | ||
nickName: "hi", | ||
region: "인천", | ||
birthdate: "1999/10/13", | ||
isMale: true | ||
}; | ||
const userRepository = dataSource.getRepository(User); | ||
await userRepository.save(userInfoDto); | ||
|
||
const result = await userService.getEmailAvailability("[email protected]"); | ||
|
||
expect(result).toEqual(await | ||
expect.objectContaining({ | ||
isexist: true | ||
}) | ||
); | ||
}); | ||
|
||
it("마이페이지 정보 요청", async () => { | ||
const userInfoDto: UserInfoDto = { | ||
email: "[email protected]", | ||
|