You've already forked pigallery2
mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-07-17 01:32:29 +02:00
implementing job history saving
This commit is contained in:
@ -16,15 +16,18 @@ describe('PhotoProcessing', () => {
|
||||
const photoPath = path.join(ProjectPath.ImageFolder, 'test_png.png');
|
||||
|
||||
expect(await PhotoProcessing
|
||||
.isValidConvertedPath(PhotoProcessing.generateConvertedFilePath(photoPath)))
|
||||
.isValidConvertedPath(PhotoProcessing.generateConvertedPath(photoPath,
|
||||
Config.Server.Media.Photo.Converting.resolution)))
|
||||
.to.be.true;
|
||||
|
||||
expect(await PhotoProcessing
|
||||
.isValidConvertedPath(PhotoProcessing.generateConvertedFilePath(photoPath + 'noPath')))
|
||||
.isValidConvertedPath(PhotoProcessing.generateConvertedPath(photoPath + 'noPath',
|
||||
Config.Server.Media.Photo.Converting.resolution)))
|
||||
.to.be.false;
|
||||
|
||||
{
|
||||
const convertedPath = PhotoProcessing.generateConvertedFilePath(photoPath);
|
||||
const convertedPath = PhotoProcessing.generateConvertedPath(photoPath,
|
||||
Config.Server.Media.Photo.Converting.resolution);
|
||||
Config.Server.Media.Photo.Converting.resolution = <any>1;
|
||||
expect(await PhotoProcessing.isValidConvertedPath(convertedPath)).to.be.false;
|
||||
}
|
||||
@ -42,18 +45,18 @@ describe('PhotoProcessing', () => {
|
||||
for (let i = 0; i < Config.Client.Media.Thumbnail.thumbnailSizes.length; ++i) {
|
||||
const thSize = Config.Client.Media.Thumbnail.thumbnailSizes[i];
|
||||
expect(await PhotoProcessing
|
||||
.isValidConvertedPath(PhotoProcessing.generateThumbnailPath(photoPath, thSize)))
|
||||
.isValidConvertedPath(PhotoProcessing.generateConvertedPath(photoPath, thSize)))
|
||||
.to.be.true;
|
||||
|
||||
|
||||
expect(await PhotoProcessing
|
||||
.isValidConvertedPath(PhotoProcessing.generateThumbnailPath(photoPath + 'noPath', thSize)))
|
||||
.isValidConvertedPath(PhotoProcessing.generateConvertedPath(photoPath + 'noPath', thSize)))
|
||||
.to.be.false;
|
||||
}
|
||||
|
||||
|
||||
expect(await PhotoProcessing
|
||||
.isValidConvertedPath(PhotoProcessing.generateThumbnailPath(photoPath, 30)))
|
||||
.isValidConvertedPath(PhotoProcessing.generateConvertedPath(photoPath, 30)))
|
||||
.to.be.false;
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user