From 4320b790bd2f2e8c8834d766d635ed964b525afc Mon Sep 17 00:00:00 2001 From: Daniel Felder Date: Sun, 1 Jun 2014 19:26:33 +0200 Subject: [PATCH] adjusting unit tests --- .../web/app/coffee/Features/Compile/CompileManager.coffee | 4 ++-- .../UnitTests/coffee/Compile/CompileControllerTests.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/web/app/coffee/Features/Compile/CompileManager.coffee b/services/web/app/coffee/Features/Compile/CompileManager.coffee index a245fff101..972b7d3286 100755 --- a/services/web/app/coffee/Features/Compile/CompileManager.coffee +++ b/services/web/app/coffee/Features/Compile/CompileManager.coffee @@ -25,12 +25,12 @@ module.exports = CompileManager = return callback(error) if error? if recentlyCompiled return callback new Error("project was recently compiled so not continuing") - + CompileManager._ensureRootDocumentIsSet project_id, (error) -> return callback(error) if error? DocumentUpdaterHandler.flushProjectToMongo project_id, (error) -> return callback(error) if error? - ClsiManager.sendRequest project_id, opt.settingsOverride ? null, (error, status, outputFiles) -> + ClsiManager.sendRequest project_id, opt.settingsOverride, (error, status, outputFiles) -> return callback(error) if error? logger.log files: outputFiles, "output files" callback(null, status, outputFiles) diff --git a/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee b/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee index 0820c0431c..fe456995ad 100644 --- a/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee +++ b/services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee @@ -44,7 +44,7 @@ describe "CompileController", -> it "should do the compile without the auto compile flag", -> @CompileManager.compile - .calledWith(@project_id, @user_id, { isAutoCompile: false }) + .calledWith(@project_id, @user_id, { isAutoCompile: false, settingsOverride:{} }) .should.equal true it "should set the content-type of the response to application/json", -> @@ -71,7 +71,7 @@ describe "CompileController", -> it "should do the compile with the auto compile flag", -> @CompileManager.compile - .calledWith(@project_id, @user_id, { isAutoCompile: true }) + .calledWith(@project_id, @user_id, { isAutoCompile: true, settingsOverride:{} }) .should.equal true describe "downloadPdf", ->