From 9f1490bc6d5086fe3b36175e67496fe4a235d8a1 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Sun, 3 Mar 2019 21:36:20 +0100 Subject: [PATCH] fixing tests --- backend/model/sql/enitites/PersonEntry.ts | 1 - common/entities/PersonDTO.ts | 3 +-- test/backend/unit/model/sql/PersonManager.ts | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/model/sql/enitites/PersonEntry.ts b/backend/model/sql/enitites/PersonEntry.ts index bbd6d23b..c1499cd1 100644 --- a/backend/model/sql/enitites/PersonEntry.ts +++ b/backend/model/sql/enitites/PersonEntry.ts @@ -23,5 +23,4 @@ export class PersonEntry implements PersonDTO { public faces: FaceRegionEntry[]; - readyThumbnail: boolean; } diff --git a/common/entities/PersonDTO.ts b/common/entities/PersonDTO.ts index 711d8197..b4b68ac2 100644 --- a/common/entities/PersonDTO.ts +++ b/common/entities/PersonDTO.ts @@ -2,7 +2,7 @@ export interface PersonDTO { id: number; name: string; count: number; - readyThumbnail: boolean; + readyThumbnail?: boolean; isFavourite: boolean; } @@ -12,7 +12,6 @@ export class Person implements PersonDTO { count: number; id: number; name: string; - readyThumbnail: boolean; constructor() { diff --git a/test/backend/unit/model/sql/PersonManager.ts b/test/backend/unit/model/sql/PersonManager.ts index 5ed37fdc..4aa4e124 100644 --- a/test/backend/unit/model/sql/PersonManager.ts +++ b/test/backend/unit/model/sql/PersonManager.ts @@ -14,8 +14,8 @@ describe('PersonManager', () => { it('should upgrade keywords to person', async () => { const pm = new PersonManager(); pm.loadAll = () => Promise.resolve(); - pm.persons = [{name: 'Han Solo', id: 0, faces: [], count: 0}, - {name: 'Anakin', id: 2, faces: [], count: 0}]; + pm.persons = [{name: 'Han Solo', id: 0, faces: [], count: 0, isFavourite: false}, + {name: 'Anakin', id: 2, faces: [], count: 0, isFavourite: false}]; const p_noFaces = { metadata: {