Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 44a569e

Browse files
jrodenbostelmleanos
authored andcommitted
feat(articles): Simple test enhancement (#1659)
* feat(articles): Simple test enhancement Simple test enhancement proposed by @jrodenbostel. Eases troubleshooting when Article save fails during test execution. Further reference here: meanjs/generator-meanjs#257 Fixes #1658 * updated per @simison's request
1 parent 482c38c commit 44a569e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/articles/tests/server/article.server.routes.tests.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,10 @@ describe('Article CRUD tests', function () {
308308
var articleObj = new Article(article);
309309

310310
// Save the article
311-
articleObj.save(function () {
311+
articleObj.save(function (err) {
312+
if (err) {
313+
return done(err);
314+
}
312315
request(app).get('/api/articles/' + articleObj._id)
313316
.end(function (req, res) {
314317
// Set assertion

0 commit comments

Comments
 (0)