From 4949d6c4e5522a92a5a829a106b6a4e220d90fa0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 5 Jul 2024 13:33:00 -0400 Subject: [PATCH] test: fix broken test in category follows --- src/activitypub/mocks.js | 2 +- test/api.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.js index a7435be095..dfdffbd37e 100644 --- a/src/activitypub/mocks.js +++ b/src/activitypub/mocks.js @@ -64,7 +64,7 @@ Mocks.profile = async (actors) => { userslug: `${preferredUsername}@${hostname}`, displayname: name, fullname: name, - joindate: new Date(published).getTime(), + joindate: new Date(published).getTime() || Date.now(), picture, status: 'offline', 'icon:text': (preferredUsername[0] || '').toUpperCase(), diff --git a/test/api.js b/test/api.js index 635ab538a3..c90aa3c3a1 100644 --- a/test/api.js +++ b/test/api.js @@ -322,7 +322,11 @@ describe('API', async () => { activitypub._cache.set(`0;https://example.org/foobar`, { id: 'https://example.org/foobar', name: 'foobar', - publicKey: 'secretcat', + publicKey: { + id: `https://example.org/foobar#key`, + owner: `https://example.org/foobar`, + publicKeyPem: 'secretcat', + }, }); setup = true;