Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
unit(manager): allow to retrieve no user
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Nov 23, 2022
1 parent 68fe517 commit 5414e8d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions database/managers/user.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,17 @@ describe("Database Manager: User read operations", () => {
expect(users.data).toHaveLength(1)
expect(users).toHaveProperty("data.0.attributes.email", model.email)
})

it("cannot get user that can reset password", async() => {
const manager = new Manager()
const resetterRole = await new RoleFactory().insertOne()
await new Factory().attach(resetterRole).insertOne()

const users = await manager.retrieveResetterEmails()

expect(users).toHaveProperty("data")
expect(users.data).toHaveLength(0)
})
})

describe("Database Manager: User create operations", () => {
Expand Down

0 comments on commit 5414e8d

Please sign in to comment.