diff --git a/srml/staking/src/tests.rs b/srml/staking/src/tests.rs index 1815d8556..159426f90 100644 --- a/srml/staking/src/tests.rs +++ b/srml/staking/src/tests.rs @@ -2230,6 +2230,29 @@ fn dont_slash_if_fraction_is_zero() { // custom tests +#[test] +fn bond_zero_should_work() { + ExtBuilder::default().build().execute_with(|| { + let (stash, controller) = (123, 456); + assert_ok!(Staking::bond( + Origin::signed(stash), + controller, + StakingBalances::RingBalance(0), + RewardDestination::Stash, + 0, + )); + + let (stash, controller) = (234, 567); + assert_ok!(Staking::bond( + Origin::signed(stash), + controller, + StakingBalances::KtonBalance(0), + RewardDestination::Stash, + 0, + )); + }); +} + #[test] fn normal_kton_should_work() { ExtBuilder::default().build().execute_with(|| {