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 a33fdfe commit b7006b8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use crate::query::FilterQuery;
use ceramic_event::{Base64String, Base64UrlString, Jws, MultiBase32String, MultiBase36String, StreamId, StreamIdType};
use ceramic_event::{
Base64String, Base64UrlString, Jws, MultiBase32String, MultiBase36String, StreamId,
StreamIdType,
};
use serde::{Deserialize, Serialize};
use serde_json::Value;

Expand Down
21 changes: 16 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ pub mod api;
mod model_definition;
mod query;

use ceramic_event::{Base64String, Cid, DeterministicInitEvent, EventArgs, Jws, MultiBase36String, Signer, StreamId, StreamIdType};
use ceramic_event::{
Base64String, Cid, DeterministicInitEvent, EventArgs, Jws, MultiBase36String, Signer, StreamId,
StreamIdType,
};
use serde::Serialize;
use std::str::FromStr;

use crate::api::ModelData;
pub use ceramic_event;
pub use json_patch;
pub use model_definition::{
GetRootSchema, ModelAccountRelation, ModelDefinition, ModelRelationDefinition,
ModelViewDefinition,
};
pub use json_patch;
pub use query::*;
pub use schemars;

Expand Down Expand Up @@ -923,12 +926,20 @@ pub mod tests {
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();
assert_eq!(post_resp.red, replace_value, "Failed to return expected value on iteration {}", i);
assert_eq!(
post_resp.red, replace_value,
"Failed to return expected value on iteration {}",
i
);

let get_resp: Ball = ceramic.get_as(&stream_id).await.unwrap();
assert_eq!(get_resp.red, replace_value);
assert_eq!(get_resp.blue, 4);
assert_eq!(get_resp, post_resp, "Failed to retrieve expected value on iteration {}", i);
assert_eq!(
get_resp, post_resp,
"Failed to retrieve expected value on iteration {}",
i
);
}
}
}
}

0 comments on commit b7006b8

Please sign in to comment.