refactor: migrate move repository to kysely (#15327)

* refactor: migrate move repository to kysely

* fix: tests

* fix: tests
This commit is contained in:
Alex
2025-01-13 22:22:03 -06:00
committed by GitHub
parent fc99c5f530
commit a35af2b242
5 changed files with 56 additions and 35 deletions

View File

@@ -235,7 +235,7 @@ describe(StorageTemplateService.name, () => {
expect(assetMock.getByIds).toHaveBeenCalledWith([assetStub.image.id], { exifInfo: true });
expect(storageMock.checkFileExists).toHaveBeenCalledTimes(3);
expect(storageMock.rename).toHaveBeenCalledWith(assetStub.image.originalPath, newPath);
expect(moveMock.update).toHaveBeenCalledWith({
expect(moveMock.update).toHaveBeenCalledWith('123', {
id: '123',
oldPath: assetStub.image.originalPath,
newPath,
@@ -277,7 +277,7 @@ describe(StorageTemplateService.name, () => {
expect(storageMock.stat).toHaveBeenCalledWith(previousFailedNewPath);
expect(storageMock.rename).toHaveBeenCalledWith(previousFailedNewPath, newPath);
expect(storageMock.copyFile).not.toHaveBeenCalled();
expect(moveMock.update).toHaveBeenCalledWith({
expect(moveMock.update).toHaveBeenCalledWith('123', {
id: '123',
oldPath: previousFailedNewPath,
newPath,