v0.12.6-hotfix

This commit is contained in:
Mateusz Gruszczyński
2026-09-04 14:50:18 +02:00
parent 63e6e13a5d
commit 11da46c4d6
12 changed files with 291 additions and 29 deletions
+11 -1
View File
@@ -38,9 +38,19 @@ mod tests {
let loaded = db.get_device(&device.id).unwrap().unwrap();
assert_eq!(loaded.mac, device.mac);
assert_eq!(db.list_devices().unwrap().len(), 1);
db.log_event("info", "test", "ok", &serde_json::json!({"a":1}))
let event_id = db
.log_event("info", "test", "ok", &serde_json::json!({"a":1}))
.unwrap();
assert_eq!(db.list_events(10).unwrap().len(), 1);
db.update_event_metadata(
event_id,
&serde_json::json!({"a":1,"notification":{"status":"silent"}}),
)
.unwrap();
assert_eq!(
db.list_events(10).unwrap()[0].metadata["notification"]["status"],
"silent"
);
{
let conn = db.lock().unwrap();
conn.execute(