fix the tests

This commit is contained in:
Tamo 2025-01-13 16:17:50 +01:00
parent 27155f845c
commit 8ff15b3dfb
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
6 changed files with 88 additions and 101 deletions

View file

@ -46,11 +46,11 @@ impl Value {
// Panic if the json doesn't contain the `status` field set to "succeeded"
#[track_caller]
pub fn succeeded(&self) -> &Self {
pub fn succeeded(&self) -> Self {
if !self.is_success() {
panic!("Called succeeded on {}", serde_json::to_string_pretty(&self.0).unwrap());
}
self
self.clone()
}
/// Return `true` if the `status` field is set to `failed`.
@ -65,11 +65,11 @@ impl Value {
// Panic if the json doesn't contain the `status` field set to "succeeded"
#[track_caller]
pub fn failed(&self) -> &Self {
pub fn failed(&self) -> Self {
if !self.is_fail() {
panic!("Called failed on {}", serde_json::to_string_pretty(&self.0).unwrap());
}
self
self.clone()
}
}