diff --git a/server/tests/routes/detections.test.js b/server/tests/routes/detections.test.js index 673396c..1fa83ad 100644 --- a/server/tests/routes/detections.test.js +++ b/server/tests/routes/detections.test.js @@ -248,7 +248,7 @@ describe('Detections Routes', () => { }); it('should reject request without tenant', async () => { - const user = await createTestUser(); + const user = await createTestUser({ tenant_id: null }); // Explicitly no tenant const token = generateTestToken(user); // No tenant const response = await request(app) @@ -257,7 +257,7 @@ describe('Detections Routes', () => { expect(response.status).to.equal(400); expect(response.body.success).to.be.false; - expect(response.body.message).to.equal('Unable to determine tenant'); + expect(response.body.message).to.equal('No tenant context available'); }); it('should reject request for inactive tenant', async () => {