Skip to content

Commit

Permalink
Implement more unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
justinphamnz committed Dec 21, 2023
1 parent bfe6590 commit 87c7a06
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pallets/spp/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 87c7a06

Please sign in to comment.