Просмотр исходного кода

Merge branch 'master' of https://github.com/sharelatex/web-sharelatex

Henry Oswald 11 лет назад
Родитель
Сommit
68e970cd69

+ 1 - 1
services/web/package.json

@@ -30,7 +30,7 @@
     "lynx": "0.1.1",
     "marked": "^0.3.3",
     "method-override": "^2.3.3",
-    "metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#0966b75a646720781c6accdca15832e675d7d3f2",
+    "metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.2.0",
     "mimelib": "0.2.14",
     "mocha": "1.17.1",
     "mongojs": "0.18.2",

+ 9 - 8
services/web/test/UnitTests/coffee/InactiveData/InactiveProjectManagerTests.coffee

@@ -13,6 +13,7 @@ describe "InactiveProjectManager", ->
 		@settings = {}
 		@DocstoreManager =
 			unarchiveProject:sinon.stub()
+			archiveProject:sinon.stub()
 		@ProjectUpdateHandler = 
 			markAsActive:sinon.stub()
 			markAsInactive:sinon.stub()
@@ -66,20 +67,20 @@ describe "InactiveProjectManager", ->
 		beforeEach ->
 
 		it "should call unarchiveProject and markAsInactive", (done)->
-			@DocstoreManager.unarchiveProject.callsArgWith(1)
+			@DocstoreManager.archiveProject.callsArgWith(1)
 			@ProjectUpdateHandler.markAsInactive.callsArgWith(1)
 
-			@InactiveProjectManager.deactivateProject @project_id, (err)->
-				@DocstoreManager.unarchiveProject.calledWith(@project_id).should.equal true
-				@ProjectUpdateHandler.markAsInactive.callsArgWith(@project_id).should.equal true
+			@InactiveProjectManager.deactivateProject @project_id, (err)=>
+				@DocstoreManager.archiveProject.calledWith(@project_id).should.equal true
+				@ProjectUpdateHandler.markAsInactive.calledWith(@project_id).should.equal true
 				done()
 
 		it "should not call markAsInactive if there was a problem unarchiving", (done)->
-			@DocstoreManager.unarchiveProject.callsArgWith(1, "errorrr")
+			@DocstoreManager.archiveProject.callsArgWith(1, "errorrr")
 			@ProjectUpdateHandler.markAsInactive.callsArgWith(1)
 
-			@InactiveProjectManager.deactivateProject @project_id, (err)->
+			@InactiveProjectManager.deactivateProject @project_id, (err)=>
 				err.should.equal "errorrr"
-				@DocstoreManager.unarchiveProject.calledWith(@project_id).should.equal true
-				@ProjectUpdateHandler.markAsInactive.callsArgWith(@project_id).should.equal false
+				@DocstoreManager.archiveProject.calledWith(@project_id).should.equal true
+				@ProjectUpdateHandler.markAsInactive.calledWith(@project_id).should.equal false
 				done()