diff --git a/runtime/gdev/tests/common/mod.rs b/runtime/gdev/tests/common/mod.rs index d78eee04980d8cc607cbf740e37653aed700dc94..023a9cc1f53f3c48ee6b5ac6811b131750039fb9 100644 --- a/runtime/gdev/tests/common/mod.rs +++ b/runtime/gdev/tests/common/mod.rs @@ -70,7 +70,7 @@ impl ExtBuilder { ( get_account_id_from_seed::<sr25519::Public>(NAMES[i]), GenesisAccountData { - balance: 0, + balance: 1_000, is_identity: true, random_id: H256([i as u8; 32]), }, @@ -179,7 +179,7 @@ impl ExtBuilder { pallet_balances::GenesisConfig::<Runtime> { balances: initial_accounts .iter() - .map(|(key, balance)| (key.clone(), balance.balance.clone())) + .map(|(key, balance)| (key.clone(), balance.balance)) .collect(), } .assimilate_storage(&mut t) @@ -279,8 +279,8 @@ impl ExtBuilder { first_reeval: 100, first_ud: 1_000, initial_monetary_mass: initial_accounts - .iter() - .map(|(_, balance)| balance.balance.clone()) + .values() + .map(|balance| balance.balance) .sum(), } .assimilate_storage(&mut t) diff --git a/runtime/gdev/tests/integration_tests.rs b/runtime/gdev/tests/integration_tests.rs index 534964b4d90f524651cadae0472d2b03a7fc47ec..2e21d36159ccabede9b7073ab2dbbf57bee832fa 100644 --- a/runtime/gdev/tests/integration_tests.rs +++ b/runtime/gdev/tests/integration_tests.rs @@ -241,7 +241,7 @@ fn test_remove_identity_after_one_ud() { assert!(Identity::identity(4).is_none()); assert_eq!( Balances::free_balance(AccountKeyring::Dave.to_account_id()), - 1_000 + 2_000 ); }); } @@ -261,10 +261,10 @@ fn test_ud_claimed_membership_on_and_off() { members_count: 4, }, )); - // UD not claimed, still initial balance to 0 + // UD not claimed, still initial balance to initial 1000 assert_eq!( Balances::free_balance(AccountKeyring::Alice.to_account_id()), - 0 + 1_000 ); run_to_block(11); @@ -280,7 +280,7 @@ fn test_ud_claimed_membership_on_and_off() { // alice balances should be increased by 1 UD assert_eq!( Balances::free_balance(AccountKeyring::Alice.to_account_id()), - 1000 + 2000 ); // UD number 2 @@ -327,7 +327,7 @@ fn test_ud_claimed_membership_on_and_off() { )); assert_eq!( Balances::free_balance(AccountKeyring::Alice.to_account_id()), - 2000 // one more UD + 3000 // one more UD ); // println!("{:?}", System::events());