Selaa lähdekoodia

update unit tests - FileHandler now calls deleteDirectory on cache directory

Brian Gough 12 vuotta sitten
vanhempi
sitoutus
3f18f6a714

+ 2 - 1
services/filestore/test/unit/coffee/FileHandlerTests.coffee

@@ -69,6 +69,7 @@ describe "FileHandler", ->
 		beforeEach ->
 		beforeEach ->
 			@keyBuilder.getConvertedFolderKey.returns(@stubbedConvetedKey)
 			@keyBuilder.getConvertedFolderKey.returns(@stubbedConvetedKey)
 			@PersistorManager.deleteFile.callsArgWith(2)
 			@PersistorManager.deleteFile.callsArgWith(2)
+			@PersistorManager.deleteDirectory.callsArgWith(2)
 
 
 		it "should tell the filestore manager to delete the file", (done)->
 		it "should tell the filestore manager to delete the file", (done)->
 			@handler.deleteFile @bucket, @key, =>
 			@handler.deleteFile @bucket, @key, =>
@@ -77,7 +78,7 @@ describe "FileHandler", ->
 
 
 		it "should tell the filestore manager to delete the cached foler", (done)->
 		it "should tell the filestore manager to delete the cached foler", (done)->
 			@handler.deleteFile @bucket, @key, =>
 			@handler.deleteFile @bucket, @key, =>
-				@PersistorManager.deleteFile.calledWith(@bucket, @stubbedConvetedKey).should.equal true
+				@PersistorManager.deleteDirectory.calledWith(@bucket, @stubbedConvetedKey).should.equal true
 				done()
 				done()
 
 
 	describe "getFile", ->
 	describe "getFile", ->