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

Function postgres_order_app_data

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

Source from the content-addressed store, hash-verified

2275 #[tokio::test]
2276 #[ignore]
2277 async fn postgres_order_app_data() {
2278 let mut db = PgConnection::connect("postgresql://").await.unwrap();
2279 let mut db = db.begin().await.unwrap();
2280 crate::clear_DANGER_(&mut db).await.unwrap();
2281
2282 let order = Order {
2283 ..Default::default()
2284 };
2285 insert_order(&mut db, &order).await.unwrap();
2286 let full_order = single_full_order_with_quote(&mut db, &order.uid)
2287 .await
2288 .unwrap()
2289 .unwrap()
2290 .full_order;
2291 assert!(full_order.full_app_data.is_none());
2292 let full_app_data = vec![0u8, 1, 2];
2293 crate::app_data::insert(&mut db, &order.app_data, &full_app_data)
2294 .await
2295 .unwrap();
2296 let full_order = single_full_order_with_quote(&mut db, &order.uid)
2297 .await
2298 .unwrap()
2299 .unwrap()
2300 .full_order;
2301 assert_eq!(full_order.full_app_data, Some(full_app_data));
2302 }
2303
2304 #[tokio::test]
2305 #[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