tests: add a check to know if a Value has an uid

This commit is contained in:
Louis Dureuil 2025-02-25 17:24:45 +01:00
parent 24fe6cd205
commit 3b2cd54b9d
No known key found for this signature in database

View File

@ -34,6 +34,10 @@ impl Value {
} }
} }
pub fn has_uid(&self) -> bool {
self["uid"].as_u64().is_some() || self["taskUid"].as_u64().is_some()
}
/// Return `true` if the `status` field is set to `succeeded`. /// Return `true` if the `status` field is set to `succeeded`.
/// Panic if the `status` field doesn't exists. /// Panic if the `status` field doesn't exists.
#[track_caller] #[track_caller]