From 87c7a06ba854f85ee163522273796a92c6b91268 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 21 Dec 2023 14:22:13 +0800 Subject: [PATCH] Implement more unit tests --- pallets/spp/src/tests.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pallets/spp/src/tests.rs b/pallets/spp/src/tests.rs index c8779313..031ac1c1 100644 --- a/pallets/spp/src/tests.rs +++ b/pallets/spp/src/tests.rs @@ -248,7 +248,9 @@ fn current_era_update_works() { Some(Rate::saturating_from_rational(35, 100000)), Some((FungibleTokenId::NativeToken(1), StakingRound::Era(1))), Some(50), - Some((FungibleTokenId::NativeToken(1), 0)) + Some((FungibleTokenId::NativeToken(1), 0)), + Some(100), + Some((FungibleTokenId::NativeToken(1), StakingRound::Era(1))) )); assert_ok!(SppModule::create_pool( @@ -540,7 +542,9 @@ fn boosting_and_claim_reward_works() { Some(Rate::saturating_from_rational(35, 100000)), Some((FungibleTokenId::NativeToken(1), StakingRound::Era(1))), Some(50), - Some((FungibleTokenId::NativeToken(1), 0)) + Some((FungibleTokenId::NativeToken(1), 0)), + Some(100), + Some((FungibleTokenId::NativeToken(1), StakingRound::Era(1))) )); assert_ok!(SppModule::create_pool( @@ -748,7 +752,9 @@ fn reward_distribution_works() { Some(Rate::saturating_from_rational(20, 100)), // Set reward rate per era is 20%. Some((FungibleTokenId::NativeToken(1), StakingRound::Era(1))), Some(50), - Some((FungibleTokenId::NativeToken(1), 0)) + Some((FungibleTokenId::NativeToken(1), 0)), + Some(100), + Some((FungibleTokenId::NativeToken(1), StakingRound::Era(1))) )); assert_ok!(SppModule::create_pool(