feat: Parse content-type more strictly

This commit is contained in:
Joachim Van Herwegen
2022-03-28 10:10:56 +02:00
parent 7152897b89
commit 027e3707fd
8 changed files with 82 additions and 15 deletions

View File

@@ -10,7 +10,7 @@ describe('ResourceUtil', (): void => {
let representation: Representation;
beforeEach(async(): Promise<void> => {
representation = new BasicRepresentation('data', 'metadata');
representation = new BasicRepresentation('data', 'meta/data');
});
describe('#updateModifiedDate', (): void => {
@@ -55,7 +55,7 @@ describe('ResourceUtil', (): void => {
it('ensures that original representation does not update when the clone is updated.', async(): Promise<void> => {
const res = await cloneRepresentation(representation);
res.metadata.contentType = 'typetype';
res.metadata.contentType = 'type/type';
expect(representation.metadata.contentType).not.toBe(res.metadata.contentType);
});
});