diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-06-18 10:38:16 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-06-18 10:38:16 -0400 |
| commit | 54d99c9e8c6d8dde2b65dbc5b2b20bdbcebc201e (patch) | |
| tree | 2be0c5f5f596a9dc25eeebebc2aa2cf36acadf62 /packages/backend/test | |
| parent | don't allow boosts to be fetched as a note over AP (diff) | |
| download | sharkey-54d99c9e8c6d8dde2b65dbc5b2b20bdbcebc201e.tar.gz sharkey-54d99c9e8c6d8dde2b65dbc5b2b20bdbcebc201e.tar.bz2 sharkey-54d99c9e8c6d8dde2b65dbc5b2b20bdbcebc201e.zip | |
fold renderUpNote into renderNote
Diffstat (limited to '')
| -rw-r--r-- | packages/backend/test/unit/activitypub.ts | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/packages/backend/test/unit/activitypub.ts b/packages/backend/test/unit/activitypub.ts index 3ad9cdc4d5..ff93e1be07 100644 --- a/packages/backend/test/unit/activitypub.ts +++ b/packages/backend/test/unit/activitypub.ts @@ -674,59 +674,6 @@ describe('ActivityPub', () => { }); }); - describe('renderUpnote', () => { - describe('summary', () => { - // I actually don't know why it does this, but the logic was already there so I've preserved it. - it('should be zero-width space when CW is empty string', async () => { - note.cw = ''; - - const result = await rendererService.renderUpNote(note, author, false); - - expect(result.summary).toBe(String.fromCharCode(0x200B)); - }); - - it('should be undefined when CW is null', async () => { - const result = await rendererService.renderUpNote(note, author, false); - - expect(result.summary).toBeUndefined(); - }); - - it('should be CW when present without mandatoryCW', async () => { - note.cw = 'original'; - - const result = await rendererService.renderUpNote(note, author, false); - - expect(result.summary).toBe('original'); - }); - - it('should be mandatoryCW when present without CW', async () => { - author.mandatoryCW = 'mandatory'; - - const result = await rendererService.renderUpNote(note, author, false); - - expect(result.summary).toBe('mandatory'); - }); - - it('should be merged when CW and mandatoryCW are both present', async () => { - note.cw = 'original'; - author.mandatoryCW = 'mandatory'; - - const result = await rendererService.renderUpNote(note, author, false); - - expect(result.summary).toBe('original, mandatory'); - }); - - it('should be CW when CW includes mandatoryCW', async () => { - note.cw = 'original and mandatory'; - author.mandatoryCW = 'mandatory'; - - const result = await rendererService.renderUpNote(note, author, false); - - expect(result.summary).toBe('original and mandatory'); - }); - }); - }); - describe('renderPersonRedacted', () => { it('should include minimal properties', async () => { const result = await rendererService.renderPersonRedacted(author); |