chore: 🔧 Update files
This commit is contained in:
parent
46caebf87e
commit
bc146e0573
1 changed files with 11 additions and 4 deletions
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue