diff --git a/tests/unit/sensors/test_sensor.cpp b/tests/unit/sensors/test_sensor.cpp index d77d792..e604f15 100644 --- a/tests/unit/sensors/test_sensor.cpp +++ b/tests/unit/sensors/test_sensor.cpp @@ -238,12 +238,13 @@ private slots: // Send USER update with new name and hidden state Sensor userUpdate(Sensor::TYPE_TEMPERATURE, 1, 25.0, "New Name", true); store.sensorGotState(userUpdate, SENSOR_UPDATE_USER); - - // Verify name and hidden were updated + + // Verify name and hidden were updated, but field was NOT updated + // (USER updates only update name/hidden/groupName, not field) QVERIFY(sensors->size() == 1); QVERIFY(sensors->at(0).name == "New Name"); QVERIFY(sensors->at(0).hidden == true); - QVERIFY(sensors->at(0).field == 25.0); + QVERIFY(sensors->at(0).field == 20.0); // Field unchanged from initial } void testSensorStoreNonUserUpdateIgnoresNameAndHidden()