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 95d01c26..147442e2 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.org' }); + const res = await patch({ website_url: 'cigarunderground.pwa.pit.world' }); expect(res.status).toBe(200); expect(await res.json()).toEqual({ - data: { ok: true, website_url: 'https://cigarunderground.org' }, + data: { ok: true, website_url: 'https://cigarunderground.pwa.pit.world' }, }); expect(rpc).toHaveBeenCalledWith( 'update_channel', expect.objectContaining({ p_channel_id: CHANNEL_ID, - p_website_url: 'https://cigarunderground.org', + p_website_url: 'https://cigarunderground.pwa.pit.world', }) ); }); diff --git a/apps/web/src/lib/channel-website.test.ts b/apps/web/src/lib/channel-website.test.ts index a2f240ac..61db330f 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.org'); + expect(ok('cigarunderground.org')).toBe('https://cigarunderground.pwa.pit.world'); 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.org/')).toBe('https://cigarunderground.org'); + expect(ok('https://cigarunderground.pwa.pit.world/')).toBe('https://cigarunderground.pwa.pit.world'); 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.org')).toBe('cigarunderground.org'); + expect(websiteLabel('https://cigarunderground.pwa.pit.world')).toBe('cigarunderground.org'); expect(websiteLabel('https://www.example.com/about?x=1')).toBe('example.com'); });