Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe("The app", function() {
.expect('Content-Type', 'text/html; charset=utf-8', done);
});

// Do any of your post requests respond with data? If so you might want to check that the data is what you expect
it('should return 200 OK on POST /postIngredient', function(done) {
request(app)
.post('/postIngredient')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('Ingredient Model', function() {
});
});

// how do you know a ingredient with that id exists? you might think about saving the id of the document you just created above and using that
it('should set the isOutOfStock boolean to true', function(done) {
Ingredient.findOneAndUpdate({'_id': "56c68f304954cb6c1b6617d2"}, {$set: {'isOutOfStock': true}}, {new: true}, function(err, ingredient){
if (err){
Expand All @@ -38,6 +39,7 @@ describe('Ingredient Model', function() {
done()
});
});
// You might want to test removing the ingredient you just created too
});

describe('Order Model', function() {
Expand Down