mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 23:47:56 +00:00
rewrite me
This commit is contained in:
+11
-5
@@ -37,6 +37,11 @@ use test_runtime::node_runtime::{
|
||||
|
||||
#[async_std::test]
|
||||
pub async fn test_embedded_client() {
|
||||
tracing_subscriber::FmtSubscriber::builder()
|
||||
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
|
||||
.try_init()
|
||||
.expect("setting default subscriber failed");
|
||||
|
||||
let tmp = TempDir::new("subxt-").expect("failed to create tempdir");
|
||||
let config = SubxtClientConfig {
|
||||
impl_name: "full-client",
|
||||
@@ -72,6 +77,7 @@ pub async fn test_embedded_client() {
|
||||
.build::<DefaultConfig>()
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let api: node_runtime::RuntimeApi<DefaultConfig> =
|
||||
ext_client.clone().to_runtime_api();
|
||||
|
||||
@@ -86,19 +92,19 @@ pub async fn test_embedded_client() {
|
||||
let bob_address = AccountKeyring::Bob.to_account_id().into();
|
||||
|
||||
// verify that we can call dispatchable functions
|
||||
let success = api
|
||||
let events = api
|
||||
.tx()
|
||||
.balances()
|
||||
.transfer(bob_address, 100_000_000_000_000_000)
|
||||
.transfer(bob_address, 100_000)
|
||||
.sign_and_submit_then_watch(&alice)
|
||||
.await
|
||||
.unwrap()
|
||||
.wait_for_finalized_success()
|
||||
.await
|
||||
.unwrap()
|
||||
.has_event::<system::events::ExtrinsicSuccess>()
|
||||
.unwrap();
|
||||
|
||||
panic!("{:?}", events);
|
||||
|
||||
// verify that we receive events
|
||||
assert!(success);
|
||||
//assert!(success);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user