diff --git a/test/backend/assets/xmp/xmp_subject.jpg b/test/backend/assets/xmp/xmp_subject.jpg new file mode 100644 index 00000000..7dbe6dd2 Binary files /dev/null and b/test/backend/assets/xmp/xmp_subject.jpg differ diff --git a/test/backend/assets/xmp/xmp_subject.json b/test/backend/assets/xmp/xmp_subject.json new file mode 100644 index 00000000..a2c1d2b7 --- /dev/null +++ b/test/backend/assets/xmp/xmp_subject.json @@ -0,0 +1,12 @@ +{ + "keywords": [ + "Max", + "Spaß", + "Yanik" + ], + "Rating": 3, + "size": { + "height": 47, + "width": 100 + } +} diff --git a/test/backend/unit/model/threading/MetaDataLoader.spec.ts b/test/backend/unit/model/threading/MetaDataLoader.spec.ts index 60e2bb1e..ad2c970c 100644 --- a/test/backend/unit/model/threading/MetaDataLoader.spec.ts +++ b/test/backend/unit/model/threading/MetaDataLoader.spec.ts @@ -26,6 +26,11 @@ describe('MetadataLoader', () => { expect(Utils.clone(data)).to.be.deep.equal(expected); }); + it('should load xmp section dc:subject into keywords', async () => { + const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/xmp/xmp_subject.jpg')); + const expected = require(path.join(__dirname, '/../../../assets/xmp/xmp_subject.json')); + expect(Utils.clone(data)).to.be.deep.equal(expected); + }); it('should load jpg 2', async () => { const data = await MetadataLoader.loadPhotoMetadata(path.join(__dirname, '/../../../assets/old_photo.jpg'));