Skip to content

Commit

Permalink
fix: test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zach-robinson-dev committed Sep 20, 2024
1 parent 5b4769b commit 21d5c37
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ mod tests {
r#"{"spec":{},"status":{"keep":1,"foo":{"bar":"demo"}}}"#
)]
#[tokio::test]
async fn test_add_to_path(#[case] path: &str, #[case] expected: &str) {
async fn test_add_to_path(#[case] path: &str, #[case] expected: serde_json::Value) {
let mut root = json!({ "spec": {}, "status": {"keep": 1} });
set_field_path(
&mut root,
Expand All @@ -258,7 +258,7 @@ mod tests {
)
.unwrap();

assert_eq!(serde_json::to_string(&root).unwrap(), expected);
assert_eq!(root, expected);
}

#[tokio::test]
Expand Down Expand Up @@ -354,10 +354,7 @@ mod tests {
&ar,
)
.unwrap();
assert_eq!(
serde_json::to_string(&target).unwrap(),
serde_json::to_string(&expected).unwrap(),
);
assert_eq!(json!(target), expected,);
}

#[tokio::test]
Expand Down Expand Up @@ -655,10 +652,7 @@ mod tests {
&resource_sync,
)
.unwrap();
assert_eq!(
serde_json::to_string(&target).unwrap(),
serde_json::to_string(&expected).unwrap(),
);
assert_eq!(json!(target), expected,);
}

#[tokio::test]
Expand Down

0 comments on commit 21d5c37

Please sign in to comment.