Report a Join on an event without an attendees list as not recorded, and trim redundant comments
This commit is contained in:
@@ -866,6 +866,16 @@ describe('registration — a direct sign-up: a Join naming an event itself', ()
|
||||
expect(w.logs.error).toEqual([]);
|
||||
});
|
||||
|
||||
test('a Join on an event with no attendees collection is NOT recorded, loudly logged — nothing written, nothing notified', async () => {
|
||||
const j = join(PLAIN);
|
||||
const w = setup({ acts: [j], stored: { [PLAIN]: plainEvent(PLAIN, { 'apods:attendees': undefined }) } });
|
||||
await emitJoin(w, j);
|
||||
expect(w.logs.error.some(m => m.includes('NOT recorded') && m.includes('no attendees collection'))).toBe(true);
|
||||
expect(writes(w.calls)).toEqual([]);
|
||||
expect(ledgerOf(w, PLAIN)).toBeUndefined();
|
||||
expect(participations(w)).toEqual([]);
|
||||
});
|
||||
|
||||
const readsOf = (w, uri) => w.calls.filter(c => ['pod-resources.get', 'pod-collections.getItems'].includes(c.action) && (c.params.resourceUri ?? c.params.collectionUri) === uri);
|
||||
const expectAnonymous = (w, n) => {
|
||||
expect(n.recipientUri).toBe(ALICE);
|
||||
|
||||
Reference in New Issue
Block a user