Fix very wrong staking test (#5952)

* fix this damn wrong staking test.

* Update frame/staking/src/tests.rs

* assert on balnce as well

* Make it a bit better.
This commit is contained in:
Kian Paimani
2020-05-11 10:41:33 +02:00
committed by GitHub
parent 679c91e18c
commit b21b70f830
2 changed files with 61 additions and 47 deletions
+5 -1
View File
@@ -473,7 +473,7 @@ impl ExtBuilder {
(41, balance_factor * 2000),
(100, 2000 * balance_factor),
(101, 2000 * balance_factor),
// This allow us to have a total_payout different from 0.
// This allows us to have a total_payout different from 0.
(999, 1_000_000_000_000),
],
}.assimilate_storage(&mut storage);
@@ -1035,3 +1035,7 @@ pub(crate) fn staking_events() -> Vec<Event<Test>> {
}
}).collect()
}
pub(crate) fn balances(who: &AccountId) -> (Balance, Balance) {
(Balances::free_balance(who), Balances::reserved_balance(who))
}