This commit is contained in:
adrinr 2023-04-10 20:17:51 +01:00
parent 56567de04a
commit c77ed3d737
2 changed files with 8 additions and 4 deletions

View File

@ -102,6 +102,6 @@ export class InvalidAPIKeyError extends BudibaseError {
export class EmailUnavailableError extends Error { export class EmailUnavailableError extends Error {
constructor(email: string) { constructor(email: string) {
super(`Email already taken: '${email}'`) super(`Email already in use: '${email}'`)
} }
} }

View File

@ -225,7 +225,9 @@ describe("/api/global/users", () => {
const response = await config.api.users.saveUser(user, 400) const response = await config.api.users.saveUser(user, 400)
expect(response.body.message).toBe(`Email already taken: '${user.email}'`) expect(response.body.message).toBe(
`Email already in use: '${user.email}'`
)
expect(events.user.created).toBeCalledTimes(0) expect(events.user.created).toBeCalledTimes(0)
}) })
@ -238,7 +240,7 @@ describe("/api/global/users", () => {
const response = await config.api.users.saveUser(user, 400) const response = await config.api.users.saveUser(user, 400)
expect(response.body.message).toBe( expect(response.body.message).toBe(
`Email already taken: '${user.email}'` `Email already in use: '${user.email}'`
) )
expect(events.user.created).toBeCalledTimes(0) expect(events.user.created).toBeCalledTimes(0)
}) })
@ -251,7 +253,9 @@ describe("/api/global/users", () => {
const response = await config.api.users.saveUser(user, 400) const response = await config.api.users.saveUser(user, 400)
expect(response.body.message).toBe(`Email already taken: '${user.email}'`) expect(response.body.message).toBe(
`Email already in use: '${user.email}'`
)
expect(events.user.created).toBeCalledTimes(0) expect(events.user.created).toBeCalledTimes(0)
}) })