MCPcopy Create free account
hub / github.com/cowprotocol/services / postgres_order_app_data

Function postgres_order_app_data

crates/database/src/orders.rs:2430–2455  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2428 #[tokio::test]
2429 #[ignore]
2430 async fn postgres_order_app_data() {
2431 let mut db = PgConnection::connect("postgresql://").await.unwrap();
2432 let mut db = db.begin().await.unwrap();
2433 crate::clear_DANGER_(&mut db).await.unwrap();
2434
2435 let order = Order {
2436 ..Default::default()
2437 };
2438 insert_order(&mut db, &order).await.unwrap();
2439 let full_order = single_full_order_with_quote(&mut db, &order.uid)
2440 .await
2441 .unwrap()
2442 .unwrap()
2443 .full_order;
2444 assert!(full_order.full_app_data.is_none());
2445 let full_app_data = vec![0u8, 1, 2];
2446 crate::app_data::insert(&mut db, &order.app_data, &full_app_data)
2447 .await
2448 .unwrap();
2449 let full_order = single_full_order_with_quote(&mut db, &order.uid)
2450 .await
2451 .unwrap()
2452 .unwrap()
2453 .full_order;
2454 assert_eq!(full_order.full_app_data, Some(full_app_data));
2455 }
2456
2457 #[tokio::test]
2458 #[ignore]

Callers

nothing calls this directly

Calls 6

connectFunction · 0.85
clear_DANGER_Function · 0.85
unwrapMethod · 0.80
insert_orderFunction · 0.70
insertFunction · 0.70

Tested by

no test coverage detected