Update tests.rs (#7784)

Fix testing for number of slashing spans.
This commit is contained in:
chenwei
2020-12-28 06:00:36 +08:00
committed by GitHub
parent 9164cde499
commit de5fc56f6c
+1 -1
View File
@@ -45,7 +45,7 @@ fn force_unstake_works() {
// Force unstake requires root.
assert_noop!(Staking::force_unstake(Origin::signed(11), 11, 2), BadOrigin);
// Force unstake needs correct number of slashing spans (for weight calculation)
assert_noop!(Staking::force_unstake(Origin::signed(11), 11, 0), BadOrigin);
assert_noop!(Staking::force_unstake(Origin::root(), 11, 0), Error::<Test>::IncorrectSlashingSpans);
// We now force them to unstake
assert_ok!(Staking::force_unstake(Origin::root(), 11, 2));
// No longer bonded.