@@ -37,10 +37,10 @@ describe('openSenseMap API luftdaten.info devices', function () {
3737 expect ( response ) . to . have . header ( 'content-type' , 'application/json; charset=utf-8' ) ;
3838 expect ( response ) . to . have . json ( 'sensors' , function ( sensors ) {
3939 expect ( sensors . some ( function ( sensor ) {
40- return sensor . sensorType === 'DHT11' && sensor . title === 'Temperatur' ;
40+ return sensor . sensor_type === 'DHT11' && sensor . title === 'Temperatur' ;
4141 } ) ) . to . be . true ;
4242 expect ( sensors . some ( function ( sensor ) {
43- return sensor . sensorType === 'DHT11' && sensor . title === 'rel. Luftfeuchte' ;
43+ return sensor . sensor_type === 'DHT11' && sensor . title === 'rel. Luftfeuchte' ;
4444 } ) ) . to . be . true ;
4545 } ) ;
4646
@@ -66,10 +66,10 @@ describe('openSenseMap API luftdaten.info devices', function () {
6666 expect ( response ) . to . have . header ( 'content-type' , 'application/json; charset=utf-8' ) ;
6767 expect ( response ) . to . have . json ( 'sensors' , function ( sensors ) {
6868 expect ( sensors . some ( function ( sensor ) {
69- return sensor . sensorType === 'DHT22' && sensor . title === 'Temperatur' ;
69+ return sensor . sensor_type === 'DHT22' && sensor . title === 'Temperatur' ;
7070 } ) ) . to . be . true ;
7171 expect ( sensors . some ( function ( sensor ) {
72- return sensor . sensorType === 'DHT22' && sensor . title === 'rel. Luftfeuchte' ;
72+ return sensor . sensor_type === 'DHT22' && sensor . title === 'rel. Luftfeuchte' ;
7373 } ) ) . to . be . true ;
7474 } ) ;
7575
@@ -95,10 +95,10 @@ describe('openSenseMap API luftdaten.info devices', function () {
9595 expect ( response ) . to . have . header ( 'content-type' , 'application/json; charset=utf-8' ) ;
9696 expect ( response ) . to . have . json ( 'sensors' , function ( sensors ) {
9797 expect ( sensors . some ( function ( sensor ) {
98- return sensor . sensorType === 'BMP180' && sensor . title === 'Temperatur' ;
98+ return sensor . sensor_type === 'BMP180' && sensor . title === 'Temperatur' ;
9999 } ) ) . to . be . true ;
100100 expect ( sensors . some ( function ( sensor ) {
101- return sensor . sensorType === 'BMP180' && sensor . title === 'Luftdruck' ;
101+ return sensor . sensor_type === 'BMP180' && sensor . title === 'Luftdruck' ;
102102 } ) ) . to . be . true ;
103103 } ) ;
104104
@@ -124,13 +124,13 @@ describe('openSenseMap API luftdaten.info devices', function () {
124124 expect ( response ) . to . have . header ( 'content-type' , 'application/json; charset=utf-8' ) ;
125125 expect ( response ) . to . have . json ( 'sensors' , function ( sensors ) {
126126 expect ( sensors . some ( function ( sensor ) {
127- return sensor . sensorType === 'BME280' && sensor . title === 'Temperatur' ;
127+ return sensor . sensor_type === 'BME280' && sensor . title === 'Temperatur' ;
128128 } ) ) . to . be . true ;
129129 expect ( sensors . some ( function ( sensor ) {
130- return sensor . sensorType === 'BME280' && sensor . title === 'rel. Luftfeuchte' ;
130+ return sensor . sensor_type === 'BME280' && sensor . title === 'rel. Luftfeuchte' ;
131131 } ) ) . to . be . true ;
132132 expect ( sensors . some ( function ( sensor ) {
133- return sensor . sensorType === 'BME280' && sensor . title === 'Luftdruck' ;
133+ return sensor . sensor_type === 'BME280' && sensor . title === 'Luftdruck' ;
134134 } ) ) . to . be . true ;
135135 } ) ;
136136
@@ -175,16 +175,16 @@ describe('openSenseMap API luftdaten.info devices', function () {
175175 expect ( response ) . to . have . header ( 'content-type' , 'application/json; charset=utf-8' ) ;
176176 expect ( response ) . to . have . json ( 'sensors' , function ( sensors ) {
177177 expect ( sensors . some ( function ( sensor ) {
178- return sensor . sensorType === 'DHT22' && sensor . title === 'Außentemperatur' ;
178+ return sensor . sensor_type === 'DHT22' && sensor . title === 'Außentemperatur' ;
179179 } ) ) . to . be . true ;
180180 expect ( sensors . some ( function ( sensor ) {
181- return sensor . sensorType === 'DHT22' && sensor . title === 'rel. Luftfeuchte draußen' ;
181+ return sensor . sensor_type === 'DHT22' && sensor . title === 'rel. Luftfeuchte draußen' ;
182182 } ) ) . to . be . true ;
183183 expect ( sensors . some ( function ( sensor ) {
184- return sensor . sensorType === 'BMP180' && sensor . title === 'Kellertemperatur' ;
184+ return sensor . sensor_type === 'BMP180' && sensor . title === 'Kellertemperatur' ;
185185 } ) ) . to . be . true ;
186186 expect ( sensors . some ( function ( sensor ) {
187- return sensor . sensorType === 'BMP180' && sensor . title === 'Luftdruck Keller' ;
187+ return sensor . sensor_type === 'BMP180' && sensor . title === 'Luftdruck Keller' ;
188188 } ) ) . to . be . true ;
189189 } ) ;
190190
@@ -345,19 +345,19 @@ describe('openSenseMap API luftdaten.info devices', function () {
345345 . then ( function ( response ) {
346346 expect ( response ) . to . have . json ( 'sensors' , function ( sensors ) {
347347 sensors . forEach ( function ( sensor ) {
348- if ( sensor . title === 'Temperatur' && sensor . sensorType === 'DHT22' ) {
348+ if ( sensor . title === 'Temperatur' && sensor . sensor_type === 'DHT22' ) {
349349 expect ( sensor . lastMeasurement . value ) . to . equal ( '24.30' ) ;
350350 }
351- if ( sensor . title === 'Kellertemperatur' && sensor . sensorType === 'BMP180' ) {
352- expect ( sensor . lastMeasurement . value ) . to . equal ( '26.00 ' ) ;
351+ if ( sensor . title === 'Kellertemperatur' && sensor . sensor_type === 'BMP180' ) {
352+ expect ( sensor . lastMeasurement . value ) . to . equal ( '26' ) ;
353353 }
354- if ( sensor . title === 'rel. Luftfeuchte' && sensor . sensorType === 'DHT22' ) {
355- expect ( sensor . lastMeasurement . value ) . to . equal ( '63.00 ' ) ;
354+ if ( sensor . title === 'rel. Luftfeuchte' && sensor . sensor_type === 'DHT22' ) {
355+ expect ( sensor . lastMeasurement . value ) . to . equal ( '63' ) ;
356356 }
357- if ( sensor . title === 'Luftdruck Keller' && sensor . sensorType === 'BMP180' ) {
357+ if ( sensor . title === 'Luftdruck Keller' && sensor . sensor_type === 'BMP180' ) {
358358 expect ( sensor . lastMeasurement . value ) . to . equal ( '100590' ) ;
359359 }
360- if ( sensor . title === 'Wifi Signal' && sensor . sensorType === 'Wifi' ) {
360+ if ( sensor . title === 'Wifi Signal' && sensor . sensor_type === 'Wifi' ) {
361361 expect ( sensor . lastMeasurement . value ) . to . equal ( '-64' ) ;
362362 }
363363
0 commit comments