From db90e6919173b0d8e78212a58d3049349743707f Mon Sep 17 00:00:00 2001 From: twallner Date: Tue, 25 Jun 2024 07:59:09 +0200 Subject: [PATCH] fixed tests --- packages/repco-core/src/datasources/activitypub.ts | 6 +++++- packages/repco-core/test/car.ts | 2 ++ packages/repco-core/test/sync.ts | 4 +++- packages/repco-server/test/smoke.ts | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/repco-core/src/datasources/activitypub.ts b/packages/repco-core/src/datasources/activitypub.ts index 959234fb..5979678d 100644 --- a/packages/repco-core/src/datasources/activitypub.ts +++ b/packages/repco-core/src/datasources/activitypub.ts @@ -674,6 +674,10 @@ export class ActivityPubDataSource contentJson[lang] = { value: video.content, } + var contentUrlsJson: { [k: string]: any } = {} + contentJson[lang] = { + value: video.url[0].href, + } const content: form.ContentItemInput = { title: titleJson, @@ -688,7 +692,7 @@ export class ActivityPubDataSource MediaAssets: mediaAssetUris, PrimaryGrouping: this._uriLink('account', this.account), summary: {}, - contentUrl: {}, + contentUrl: contentUrlsJson, originalLanguages: {}, removed: false, } diff --git a/packages/repco-core/test/car.ts b/packages/repco-core/test/car.ts index aefd962a..f1d13d71 100644 --- a/packages/repco-core/test/car.ts +++ b/packages/repco-core/test/car.ts @@ -27,6 +27,8 @@ function mkinput(i: number) { subtitle: 'asdf', summary: 'yoo', contentUrl: 'url', + removed: false, + originalLanguages: {}, }, } return input diff --git a/packages/repco-core/test/sync.ts b/packages/repco-core/test/sync.ts index a33ed7db..525c0609 100644 --- a/packages/repco-core/test/sync.ts +++ b/packages/repco-core/test/sync.ts @@ -17,7 +17,9 @@ test('simple sync', async (assert) => { content: 'hello', subtitle: 'asdf', summary: 'yoo', - contentUrl: 'url', + contentUrl: {}, + removed: false, + originalLanguages: {}, }, } await repo1.saveEntity(input) diff --git a/packages/repco-server/test/smoke.ts b/packages/repco-server/test/smoke.ts index 5954afbd..112a161d 100644 --- a/packages/repco-server/test/smoke.ts +++ b/packages/repco-server/test/smoke.ts @@ -14,6 +14,8 @@ async function createTestRepo(prisma: PrismaClient) { subtitle: 'asdf', summary: 'yoo', contentUrl: 'url', + removed: false, + originalLanguages: {}, }, } await repo.saveEntity('me', input)