Skip to content

Commit d4cb2d8

Browse files
committed
Fix stale outbox test expectations
The current staged changes are both follow-ups to earlier outbox review fixes. One middleware regression now expects the 401 returned by auth-before-actor handling, and the mock proof-shape regression uses a normal Create instance with an overridden raw JSON-LD view instead of trying to deserialize an intentionally shape-only proof payload. #688 Assisted-by: OpenCode:gpt-5.4
1 parent d1dff22 commit d4cb2d8

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

packages/fedify/src/federation/middleware.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2171,7 +2171,7 @@ test("Federation.setOutboxListeners()", async (t) => {
21712171
}),
21722172
{ contextData: undefined },
21732173
);
2174-
assertEquals(response.status, 404);
2174+
assertEquals(response.status, 401);
21752175
});
21762176

21772177
await t.step("POST without listeners returns 405", async () => {

packages/testing/src/mock.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,12 @@ test(
383383
"https://w3id.org/security#proofValue": [{ "@value": "signature" }],
384384
},
385385
};
386-
const activity = await Activity.fromJsonLd(proofJson, {
387-
documentLoader: mockDocumentLoader,
388-
contextLoader: mockDocumentLoader,
386+
const activity = new Create({
387+
id: new URL("https://example.com/activities/1"),
388+
actor: new URL("https://example.com/users/alice"),
389+
});
390+
Object.assign(activity, {
391+
toJsonLd: () => Promise.resolve(proofJson),
389392
});
390393

391394
await mockFederation.postOutboxActivity("alice", activity);

0 commit comments

Comments
 (0)