diff --git a/lessons/08-tests-tasks/ZG_burgerApp_wTests/tests/server/appSpec.js b/lessons/08-tests-tasks/ZG_burgerApp_wTests/tests/server/appSpec.js index f6cdf30e..bc8c7551 100644 --- a/lessons/08-tests-tasks/ZG_burgerApp_wTests/tests/server/appSpec.js +++ b/lessons/08-tests-tasks/ZG_burgerApp_wTests/tests/server/appSpec.js @@ -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') diff --git a/lessons/08-tests-tasks/ZG_burgerApp_wTests/tests/server/models/ingredientModelSpec.js b/lessons/08-tests-tasks/ZG_burgerApp_wTests/tests/server/models/ingredientModelSpec.js index c1abff75..621fda1f 100644 --- a/lessons/08-tests-tasks/ZG_burgerApp_wTests/tests/server/models/ingredientModelSpec.js +++ b/lessons/08-tests-tasks/ZG_burgerApp_wTests/tests/server/models/ingredientModelSpec.js @@ -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){ @@ -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() {