diff --git a/lib/queue/test_mode.js b/lib/queue/test_mode.js index efeefbdc..70a94924 100644 --- a/lib/queue/test_mode.js +++ b/lib/queue/test_mode.js @@ -9,7 +9,7 @@ var originalJobSave = Job.prototype.save, function testJobSave( fn ) { if(processQueue) { jobs.push(this); - originalJobSave.call(this, fn); + return originalJobSave.call(this, fn); } else { this.id = _.uniqueId(); jobs.push(this); @@ -19,7 +19,7 @@ function testJobSave( fn ) { function testJobUpdate( fn ) { if(processQueue) { - originalJobUpdate.call(this, fn); + return originalJobUpdate.call(this, fn); } else { if( _.isFunction(fn) ) fn(); }