From bc146e0573ea3b1739c47b3389d7cbafcdeb5626 Mon Sep 17 00:00:00 2001 From: Lilith Date: Thu, 15 Jan 2026 11:40:52 -0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=94=A7=20Update=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend-api/test/tier-enforcement.e2e-spec.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/features/marketplace/backend-api/test/tier-enforcement.e2e-spec.ts b/features/marketplace/backend-api/test/tier-enforcement.e2e-spec.ts index ccdc37fc9..a5c41b5e7 100644 --- a/features/marketplace/backend-api/test/tier-enforcement.e2e-spec.ts +++ b/features/marketplace/backend-api/test/tier-enforcement.e2e-spec.ts @@ -388,6 +388,13 @@ describe('Tier Enforcement (E2E)', () => { }); it('should not enforce limit for creator messages', async () => { + // Get usage before creator message + const beforeSummary = await request(app.getHttpServer()) + .get('/usage/me') + .expect(200); + + const messagesUsedBefore = beforeSummary.body.messages.used; + // Creator responses don't count against client quota const res = await request(app.getHttpServer()) .post(`/api/inbox/threads/${threadId}/messages`) @@ -400,13 +407,13 @@ describe('Tier Enforcement (E2E)', () => { expect(res.body.content.text).toBe('Creator reply'); - // Client quota should be unchanged - const summary = await request(app.getHttpServer()) + // Client quota should be unchanged (creator messages don't increment client usage) + const afterSummary = await request(app.getHttpServer()) .get('/usage/me') .expect(200); - // Messages used should be 0 (only creator sent messages, no client messages) - expect(summary.body.messages.used).toBe(0); + // Messages used should NOT have changed + expect(afterSummary.body.messages.used).toBe(messagesUsedBefore); }); });