Skip to content

Node.js based forum software built for the modern web

test: fix broken test in category follows

Julian Lam4949d6c4e552
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;