From edb681382905a388445f399e44d5e5184de73181 Mon Sep 17 00:00:00 2001 From: Hugo Trentesaux <hugo@trentesaux.fr> Date: Tue, 5 Mar 2024 14:58:33 +0100 Subject: [PATCH] complete the test with refund check --- runtime/gdev/tests/balance_tests.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/runtime/gdev/tests/balance_tests.rs b/runtime/gdev/tests/balance_tests.rs index 85c3b0ae3..9c4b35ad7 100644 --- a/runtime/gdev/tests/balance_tests.rs +++ b/runtime/gdev/tests/balance_tests.rs @@ -19,6 +19,7 @@ mod common; use common::*; +use frame_support::traits::OnIdle; use frame_support::traits::StoredMap; use frame_support::{assert_noop, assert_ok}; use gdev_runtime::*; @@ -153,11 +154,18 @@ fn test_transfer_all_linked_no_member() { frame_system::RawOrigin::Signed(ferdie.clone()).into(), AccountKeyring::Bob.to_account_id().into(), false - ),); + )); assert_eq!(Balances::free_balance(ferdie.clone()), 0); // During reaping the account is unlinked assert!(frame_system::Pallet::<Runtime>::get(&ferdie) .linked_idty .is_none()); + + // call on_idle to activate refund system + Quota::on_idle(System::block_number(), Weight::from(1_000_000_000)); + + // check that one block later the account is still empty + run_to_block(2); + assert_eq!(Balances::free_balance(ferdie.clone()), 0); }) } -- GitLab