Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dbcfd committed Feb 14, 2024
1 parent 7c59f9e commit 5ddc317
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,32 +657,28 @@ pub mod tests {

tokio::time::sleep(Duration::from_secs(1)).await;

let patch = json_patch::Patch(vec![json_patch::PatchOperation::Add(
AddOperation {
let patch = json_patch::Patch(vec![
json_patch::PatchOperation::Add(AddOperation {
path: "/creator".to_string(),
value: serde_json::Value::String(ceramic.client().signer().id().id.clone()),
},
), json_patch::PatchOperation::Add(
AddOperation {
}),
json_patch::PatchOperation::Add(AddOperation {
path: "/radius".to_string(),
value: serde_json::Value::Number(serde_json::Number::from(1)),
}
), json_patch::PatchOperation::Add(
AddOperation {
}),
json_patch::PatchOperation::Add(AddOperation {
path: "/red".to_string(),
value: serde_json::Value::Number(serde_json::Number::from(2)),
}
), json_patch::PatchOperation::Add(
AddOperation {
}),
json_patch::PatchOperation::Add(AddOperation {
path: "/green".to_string(),
value: serde_json::Value::Number(serde_json::Number::from(3)),
}
), json_patch::PatchOperation::Add(
AddOperation {
}),
json_patch::PatchOperation::Add(AddOperation {
path: "/blue".to_string(),
value: serde_json::Value::Number(serde_json::Number::from(4)),
}
)]);
}),
]);
let post_resp = ceramic.update(&model, &stream_id, patch).await.unwrap();
assert_eq!(post_resp.stream_id, stream_id);
let post_resp: Ball = serde_json::from_value(post_resp.state.unwrap().content).unwrap();
Expand Down

0 comments on commit 5ddc317

Please sign in to comment.