1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Fix for the broken test

This commit is contained in:
ehhc
2018-05-10 22:39:00 +02:00
parent 03fd1e29e3
commit e9218d1088

View File

@@ -267,10 +267,10 @@ it('should delete the correct attachment folder if a note is deleted', function
const storageKey = 'storageKey'
const noteKey = 'noteKey'
findStorage.findStorage = jest.fn(() => dummyStorage)
sander.rimraf = jest.fn()
sander.rimrafSync = jest.fn()
const expectedPathToBeDeleted = path.join(dummyStorage.path, systemUnderTest.DESTINATION_FOLDER, noteKey)
systemUnderTest.deleteAttachmentFolder(storageKey, noteKey)
expect(findStorage.findStorage).toHaveBeenCalledWith(storageKey)
expect(sander.rimraf).toHaveBeenCalledWith(expectedPathToBeDeleted)
expect(sander.rimrafSync).toHaveBeenCalledWith(expectedPathToBeDeleted)
})