v0.12.6-hotfix
This commit is contained in:
+11
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user