Skip to content

Commit

Permalink
test: make sure nothing left to claim
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersuweijie committed Feb 28, 2024
1 parent 644c973 commit 82b29b8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions x/alliance/keeper/tests/reward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1301,4 +1301,21 @@ func TestMigratedRewards(t *testing.T) {
rewards4, err := app.AllianceKeeper.ClaimDelegationRewards(ctx, user2, val2, AllianceDenomTwo)
require.NoError(t, err)
require.Equal(t, sdk.NewInt(4_000_000+5_000_000-1), rewards4.AmountOf(bondDenom))

// Make sure nothing left to claim
rewards1, err = app.AllianceKeeper.ClaimDelegationRewards(ctx, user1, val1, AllianceDenom)
require.NoError(t, err)
require.Equal(t, sdk.NewInt(0), rewards1.AmountOf(bondDenom))

rewards2, err = app.AllianceKeeper.ClaimDelegationRewards(ctx, user2, val1, AllianceDenomTwo)
require.NoError(t, err)
require.Equal(t, sdk.NewInt(0), rewards2.AmountOf(bondDenom))

rewards3, err = app.AllianceKeeper.ClaimDelegationRewards(ctx, user1, val2, AllianceDenomTwo)
require.NoError(t, err)
require.Equal(t, sdk.NewInt(0), rewards3.AmountOf(bondDenom))

rewards4, err = app.AllianceKeeper.ClaimDelegationRewards(ctx, user2, val2, AllianceDenomTwo)
require.NoError(t, err)
require.Equal(t, sdk.NewInt(0), rewards4.AmountOf(bondDenom))
}

0 comments on commit 82b29b8

Please sign in to comment.