Method
createPost
(userId: string, payload: any, statusCodeExpected = httpStatus.CREATED)
Source from the content-addressed store, hash-verified
| 90 | } |
| 91 | |
| 92 | async createPost(userId: string, payload: any, statusCodeExpected = httpStatus.CREATED) { |
| 93 | const { body } = await this.request |
| 94 | .post(`/users/${userId}/posts`) |
| 95 | .send(payload) |
| 96 | .expect(statusCodeExpected); |
| 97 | |
| 98 | return body; |
| 99 | } |
| 100 | |
| 101 | async listPosts(userId: string, statusCodeExpected = httpStatus.OK) { |
| 102 | const { body } = await this.request |
Tested by
no test coverage detected