Skip to content

Commit

Permalink
Update TestHelper.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Feb 19, 2024
1 parent 1766f13 commit b416fa3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions api/tests/TestHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ const getToken = (cookie: string) => {
}

const signin = async (appType: movininTypes.AppType, email: string) => {
const payload: movininTypes.SignInPayload = {
email,
password: PASSWORD,
}

const signinRequest = await request(app)
.post(`/api/sign-in/${appType}`)
.send({
email,
password: PASSWORD,
})
.send(payload)

expect(signinRequest.statusCode).toBe(200)
const cookies = signinRequest.headers['set-cookie'] as unknown as string[]
Expand Down

0 comments on commit b416fa3

Please sign in to comment.