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.
- Loading branch information
Showing
1 changed file
with
29 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 |
---|---|---|
|
@@ -119,6 +119,35 @@ describe("마이페이지", () => { | |
afterAll(async () => { | ||
await dataSource.destroy(); | ||
}); | ||
it("닉네임 중복 확인 요청", async () => { | ||
|
||
const firstResult = await userService.getNickNameAvailability("hi"); | ||
|
||
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.getNickNameAvailability("hi"); | ||
|
||
expect(result).toEqual(await | ||
expect.objectContaining({ | ||
isexist: true | ||
}) | ||
); | ||
}); | ||
|
||
it("마이페이지 정보 요청", async () => { | ||
const userInfoDto: UserInfoDto = { | ||
|