Explorar el Código

fixed commended tests

Henry Oswald hace 8 años
padre
commit
e4e30cf2e2
Se han modificado 1 ficheros con 24 adiciones y 13 borrados
  1. 24 13
      services/clsi/test/unit/coffee/CompileManagerTests.coffee

+ 24 - 13
services/clsi/test/unit/coffee/CompileManagerTests.coffee

@@ -259,13 +259,19 @@ describe "CompileManager", ->
 				@CommandRunner.run = sinon.stub().callsArgWith(6, null, {stdout:@stdout})
 				@CompileManager.syncFromCode @project_id, @user_id, @file_name, @line, @column, @callback
 
-			# it "should execute the synctex binary", ->
-			# 	bin_path = Path.resolve(__dirname + "/../../../bin/synctex")
-			# 	synctex_path = "#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}/output.pdf"
-			# 	file_path = "#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}/#{@file_name}"
-			# 	@child_process.execFile
-			# 		.calledWith(bin_path, ["code", synctex_path, file_path, @line, @column], timeout: 10000)
-			# 		.should.equal true
+			it "should execute the synctex binary", ->
+				bin_path = Path.resolve(__dirname + "/../../../bin/synctex")
+				synctex_path = "#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}/output.pdf"
+				file_path = "#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}/#{@file_name}"
+				@CommandRunner.run
+					.calledWith(
+						"#{@project_id}-#{@user_id}",
+						['/opt/synctex', 'code', synctex_path, file_path, @line, @column],
+						"#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}",
+						@Settings.clsi.docker.image,
+						10000,
+						{}
+						).should.equal true
 
 			it "should call the callback with the parsed output", ->
 				@callback
@@ -285,12 +291,17 @@ describe "CompileManager", ->
 				@CommandRunner.run = sinon.stub().callsArgWith(6, null, {stdout:@stdout})
 				@CompileManager.syncFromPdf @project_id, @user_id, @page, @h, @v, @callback
 
-			# it "should execute the synctex binary", ->
-			# 	bin_path = Path.resolve(__dirname + "/../../../bin/synctex")
-			# 	synctex_path = "#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}/output.pdf"
-			# 	@CommandRunner.run
-			# 		.calledWith(bin_path, ["pdf", synctex_path, @page, @h, @v], timeout: 10000)
-			# 		.should.equal true
+			it "should execute the synctex binary", ->
+				bin_path = Path.resolve(__dirname + "/../../../bin/synctex")
+				synctex_path = "#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}/output.pdf"
+				@CommandRunner.run
+					.calledWith(
+						"#{@project_id}-#{@user_id}",
+						['/opt/synctex', "pdf", synctex_path, @page, @h, @v],				
+						"#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}",
+						@Settings.clsi.docker.image,
+						10000,
+						{}).should.equal true
 
 			it "should call the callback with the parsed output", ->
 				@callback