Explorar el Código

adjusting unit tests

Daniel Felder hace 12 años
padre
commit
4320b790bd

+ 2 - 2
services/web/app/coffee/Features/Compile/CompileManager.coffee

@@ -25,12 +25,12 @@ module.exports = CompileManager =
 				return callback(error) if error?
 				return callback(error) if error?
 				if recentlyCompiled
 				if recentlyCompiled
 					return callback new Error("project was recently compiled so not continuing")
 					return callback new Error("project was recently compiled so not continuing")
-
+				
 				CompileManager._ensureRootDocumentIsSet project_id, (error) ->
 				CompileManager._ensureRootDocumentIsSet project_id, (error) ->
 					return callback(error) if error?
 					return callback(error) if error?
 					DocumentUpdaterHandler.flushProjectToMongo project_id, (error) ->
 					DocumentUpdaterHandler.flushProjectToMongo project_id, (error) ->
 						return callback(error) if 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?
 							return callback(error) if error?
 							logger.log files: outputFiles, "output files"
 							logger.log files: outputFiles, "output files"
 							callback(null, status, outputFiles)
 							callback(null, status, outputFiles)

+ 2 - 2
services/web/test/UnitTests/coffee/Compile/CompileControllerTests.coffee

@@ -44,7 +44,7 @@ describe "CompileController", ->
 
 
 			it "should do the compile without the auto compile flag", ->
 			it "should do the compile without the auto compile flag", ->
 				@CompileManager.compile
 				@CompileManager.compile
-					.calledWith(@project_id, @user_id, { isAutoCompile: false })
+					.calledWith(@project_id, @user_id, { isAutoCompile: false, settingsOverride:{} })
 					.should.equal true
 					.should.equal true
 
 
 			it "should set the content-type of the response to application/json", ->
 			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", ->
 			it "should do the compile with the auto compile flag", ->
 				@CompileManager.compile
 				@CompileManager.compile
-					.calledWith(@project_id, @user_id, { isAutoCompile: true })
+					.calledWith(@project_id, @user_id, { isAutoCompile: true, settingsOverride:{} })
 					.should.equal true
 					.should.equal true
 
 
 	describe "downloadPdf", ->
 	describe "downloadPdf", ->