Test: update test to correct handle user item updates
This commit is contained in:
parent
25b9f87285
commit
7af4ec4957
1 changed files with 4 additions and 3 deletions
|
|
@ -239,11 +239,12 @@ private slots:
|
|||
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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue