Skip to content

Commit

Permalink
Ammended posts controller test to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcarmichael committed May 19, 2023
1 parent 29f0f9f commit d27e222
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/spec/controllers/posts.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ describe("/posts", () => {
let response = await request(app)
.post("/posts")
.send({ message: "hello again world" });
expect(response.body.token).toEqual(undefined);
expect(response.status).toEqual(401);
expect(response.body.message).toEqual("auth error");
expect(response.body.token).toEqual(undefined);

});
})

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d27e222

Please sign in to comment.