chore(api): apply rustfmt across modules and tests
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
6c1357ec4d
commit
a4ef6ca49e
@@ -45,10 +45,15 @@ async fn checkout_splits_orders_per_shop_and_clears_cart() {
|
||||
assert!(shop_ids.contains(&shop_a) && shop_ids.contains(&shop_b));
|
||||
for item in items {
|
||||
assert!(
|
||||
item["shop_name"]["en"].as_str().is_some_and(|s| !s.is_empty()),
|
||||
item["shop_name"]["en"]
|
||||
.as_str()
|
||||
.is_some_and(|s| !s.is_empty()),
|
||||
"line must carry a bilingual shop name"
|
||||
);
|
||||
assert_eq!(item["stock"], 5, "stock is the SKU's, before checkout decrements it");
|
||||
assert_eq!(
|
||||
item["stock"], 5,
|
||||
"stock is the SKU's, before checkout decrements it"
|
||||
);
|
||||
}
|
||||
|
||||
let orders = checkout(&app, &buyer).await;
|
||||
@@ -71,10 +76,13 @@ async fn checkout_splits_orders_per_shop_and_clears_cart() {
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(res.json::<serde_json::Value>().await.unwrap()["items"]
|
||||
.as_array()
|
||||
.unwrap()
|
||||
.len(), 0);
|
||||
assert_eq!(
|
||||
res.json::<serde_json::Value>().await.unwrap()["items"]
|
||||
.as_array()
|
||||
.unwrap()
|
||||
.len(),
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
@@ -193,7 +201,10 @@ async fn fulfillment_flow_partial_then_complete() {
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(res.json::<serde_json::Value>().await.unwrap()["status"], "fulfilling");
|
||||
assert_eq!(
|
||||
res.json::<serde_json::Value>().await.unwrap()["status"],
|
||||
"fulfilling"
|
||||
);
|
||||
|
||||
// second shipment covers remainder → shipped after mark
|
||||
let res = client()
|
||||
@@ -222,7 +233,10 @@ async fn fulfillment_flow_partial_then_complete() {
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(res.json::<serde_json::Value>().await.unwrap()["status"], "shipped");
|
||||
assert_eq!(
|
||||
res.json::<serde_json::Value>().await.unwrap()["status"],
|
||||
"shipped"
|
||||
);
|
||||
|
||||
// confirm both deliveries → completed
|
||||
for sid in [&shipment1_id, &shipment2_id] {
|
||||
@@ -240,7 +254,10 @@ async fn fulfillment_flow_partial_then_complete() {
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(res.json::<serde_json::Value>().await.unwrap()["status"], "completed");
|
||||
assert_eq!(
|
||||
res.json::<serde_json::Value>().await.unwrap()["status"],
|
||||
"completed"
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user