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

Commit

Permalink
unit(chat message): wait for deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Oct 11, 2022
1 parent 8c58ba7 commit 4ceb0b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion routes/api/chat_message/create.post.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("Controller: POST /api/chat_message", () => {
"type": "chat_message"
}
},
"user": new UserFactory().serialize(user)
"user": await new UserFactory().serialize(user)
})

await requester.runMiddleware(bodyValidationFunction)
Expand Down
4 changes: 2 additions & 2 deletions routes/api/chat_message/create_with_file.post.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("Controller: POST /api/chat_message/create_with_file", () => {
}
}
},
"user": userFactory.serialize(user)
"user": await userFactory.serialize(user)
})

await requester.runMiddleware(bodyValidationFunction)
Expand Down Expand Up @@ -92,7 +92,7 @@ describe("Controller: POST /api/chat_message/create_with_file", () => {
}
}
},
"user": userFactory.serialize(user)
"user": await userFactory.serialize(user)
})

await requester.runMiddleware(bodyValidationFunction)
Expand Down
4 changes: 2 additions & 2 deletions routes/api/chat_message/list.get.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("Controller: GET /api/chat_message", () => {
"existence": "*"
}
},
"user": userFactory.serialize(user)
"user": await userFactory.serialize(user)
})

await requester.runMiddleware(queryValidationFunction)
Expand All @@ -55,7 +55,7 @@ describe("Controller: GET /api/chat_message", () => {
"existence": "hello"
}
},
"user": userFactory.serialize(user)
"user": await userFactory.serialize(user)
})

await requester.runMiddleware(queryValidationFunction)
Expand Down
4 changes: 2 additions & 2 deletions routes/api/chat_message/update(id).patch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("Controller: PATCH /api/chat_message/:id", () => {
"type": "chat_message"
}
},
"user": new UserFactory().serialize(user)
"user": await new UserFactory().serialize(user)
})

await requester.runMiddleware(bodyValidationFunction)
Expand All @@ -59,7 +59,7 @@ describe("Controller: PATCH /api/chat_message/:id", () => {
"id": String(model.id)
},
"user": {
...new UserFactory().serialize(user),
...await new UserFactory().serialize(user),
"meta": {
"hasDefaultPassword": false
}
Expand Down

0 comments on commit 4ceb0b0

Please sign in to comment.