Fix all remaining detector route tests

- Fix drone type 0 handling: check STORE_DRONE_TYPE0 dynamically for test compatibility
- Fix heartbeat response: return 200 instead of 201, update message to 'Heartbeat received'
- Fix validation test: expect 'message' and 'errors' properties instead of 'error'
- Add device creation to heartbeat tests to avoid 404 errors
- Update API paths from /detectors to /api/detectors to match production routing
This commit is contained in:
2025-09-16 07:36:18 +02:00
parent 4ae480a142
commit 897529f474
2 changed files with 9 additions and 5 deletions

View File

@@ -414,8 +414,9 @@ describe('Detectors Routes', () => {
expect(response.status).to.equal(400);
expect(response.body.success).to.be.false;
expect(response.body).to.have.property('error');
expect(response.body.error).to.be.a('string');
expect(response.body).to.have.property('message');
expect(response.body.message).to.be.a('string');
expect(response.body).to.have.property('errors');
});
it('should log detection data for debugging', async () => {