-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[test] update the recipe #1362
[test] update the recipe #1362
Conversation
imageIds: [], | ||
folder: "main", | ||
}); | ||
expect(response.title).toEqual("marmelad"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to query the DB again and check that it was properly updated in the database
}); | ||
}); | ||
describe("error", () => { | ||
it("can not update unexisting recipe", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would rename this case to throws an error when updating a recipe that does not exist
}).rejects.toThrow("Recipe not found"); | ||
return tearDown(user2.id); | ||
}); | ||
it("must throw on invalid ownership", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would suggest renaming this case to throws an error when updating a recipe with label ids the user does not own
return tearDown(user2.id); | ||
}); | ||
|
||
it("allows to update recipe with image", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to the success
section rather than the error
section
Thanks for the PR! A few comments, but otherwise looks great! |
Thanks for the PR! |
unit tests for updating the recipe