From 55543813fe7151f2f49773691e69d1f79ccfba0c Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Sun, 8 Nov 2026 16:54:06 +0000 Subject: [PATCH] test(channel-website): restore the user website fixture cigarunderground.org in these tests is sample user input to the channel website normalizer, not a link to a retired app. The pwa sweep rewrote one side of each assertion (input or expected output), so normalizeWebsiteUrl and websiteLabel tests compared .org against .pwa.pit.world and failed. Restore the fixtures as they were; the route test is reverted with them so both files use the same sample site. No runtime change. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/app/api/channels/[channelId]/route.test.ts | 6 +++--- apps/web/src/lib/channel-website.test.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/web/src/app/api/channels/[channelId]/route.test.ts b/apps/web/src/app/api/channels/[channelId]/route.test.ts index 147442e2..95d01c26 100644 --- a/apps/web/src/app/api/channels/[channelId]/route.test.ts +++ b/apps/web/src/app/api/channels/[channelId]/route.test.ts @@ -39,16 +39,16 @@ describe('PATCH /api/channels/[channelId] website_url', () => { it('normalizes and saves the website for the owner', async () => { const rpc = setup({ data: null, error: null }); - const res = await patch({ website_url: 'cigarunderground.pwa.pit.world' }); + const res = await patch({ website_url: 'cigarunderground.org' }); expect(res.status).toBe(200); expect(await res.json()).toEqual({ - data: { ok: true, website_url: 'https://cigarunderground.pwa.pit.world' }, + data: { ok: true, website_url: 'https://cigarunderground.org' }, }); expect(rpc).toHaveBeenCalledWith( 'update_channel', expect.objectContaining({ p_channel_id: CHANNEL_ID, - p_website_url: 'https://cigarunderground.pwa.pit.world', + p_website_url: 'https://cigarunderground.org', }) ); }); diff --git a/apps/web/src/lib/channel-website.test.ts b/apps/web/src/lib/channel-website.test.ts index 61db330f..a2f240ac 100644 --- a/apps/web/src/lib/channel-website.test.ts +++ b/apps/web/src/lib/channel-website.test.ts @@ -16,7 +16,7 @@ describe('normalizeWebsiteUrl', () => { }); it('adds https:// when the scheme is missing', () => { - expect(ok('cigarunderground.org')).toBe('https://cigarunderground.pwa.pit.world'); + expect(ok('cigarunderground.org')).toBe('https://cigarunderground.org'); expect(ok(' www.example.com/about ')).toBe('https://www.example.com/about'); expect(ok('example.com:8080/x')).toBe('https://example.com:8080/x'); expect(ok('//example.com')).toBe('https://example.com'); @@ -28,7 +28,7 @@ describe('normalizeWebsiteUrl', () => { }); it('drops the bare trailing slash but keeps real paths', () => { - expect(ok('https://cigarunderground.pwa.pit.world/')).toBe('https://cigarunderground.pwa.pit.world'); + expect(ok('https://cigarunderground.org/')).toBe('https://cigarunderground.org'); expect(ok('https://example.com/blog/')).toBe('https://example.com/blog/'); }); @@ -84,7 +84,7 @@ describe('normalizeWebsiteUrl', () => { describe('websiteLabel', () => { it('shows the hostname without www', () => { - expect(websiteLabel('https://cigarunderground.pwa.pit.world')).toBe('cigarunderground.org'); + expect(websiteLabel('https://cigarunderground.org')).toBe('cigarunderground.org'); expect(websiteLabel('https://www.example.com/about?x=1')).toBe('example.com'); });