MCPcopy Create free account
hub / github.com/EnsoBuild/temper / post_simulate_no_data

Function post_simulate_no_data

tests/api.rs:347–371  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

345
346#[tokio::test(flavor = "multi_thread")]
347async fn post_simulate_no_data() {
348 let filter = filter(config());
349
350 let json = serde_json::json!({
351 "chainId": 1,
352 "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
353 "to": "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5",
354 "gasLimit": 21000,
355 "value": "100000",
356 "blockNumber": 16784600
357 });
358
359 let res = warp::test::request()
360 .method("POST")
361 .path("/simulate")
362 .json(&json)
363 .reply(&filter)
364 .await;
365
366 assert_eq!(res.status(), 200);
367
368 let body: SimulationResponse = serde_json::from_slice(res.body()).unwrap();
369
370 assert!(body.success);
371}
372
373#[tokio::test(flavor = "multi_thread")]
374async fn post_simulate_incorrect_chain_id() {

Callers

nothing calls this directly

Calls 2

filterFunction · 0.85
configFunction · 0.85

Tested by

no test coverage detected