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:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user