Fix jwt-token

This commit is contained in:
2025-09-15 20:49:46 +02:00
parent 3345510ccc
commit 2d18212f62
12 changed files with 19 additions and 73 deletions

View File

@@ -258,10 +258,7 @@ describe('Detectors Routes', () => {
key: 'device_123_key',
device_id: 123,
geo_lat: 59.3293,
geo_lon: 18.0686,
signal_strength: -50,
battery_level: 85,
temperature: 22.5
geo_lon: 18.0686
};
const response = await request(app)
@@ -302,11 +299,10 @@ describe('Detectors Routes', () => {
expect(response.body.success).to.be.true;
});
it('should validate battery level range', async () => {
it('should validate required fields', async () => {
const heartbeatData = {
type: 'heartbeat',
key: 'device_123_key',
battery_level: 150 // Invalid range
type: 'heartbeat'
// Missing required key field
};
const response = await request(app)
@@ -323,8 +319,7 @@ describe('Detectors Routes', () => {
const heartbeatData = {
type: 'heartbeat',
key: 'device_123_key',
device_id: 123,
battery_level: 85
device_id: 123
};
const response = await request(app)