Skip to content

Commit

Permalink
additional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0n00gler committed Sep 24, 2024
1 parent 2d20be4 commit d4597e1
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion x/bank/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ var (
priv2 = secp256k1.GenPrivKey()
addr2 = sdk.AccAddress(priv2.PubKey().Address())
addr3 = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address())
addr4 = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address())
addr5 = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address())

coins = sdk.Coins{sdk.NewInt64Coin("foocoin", 10)}
halfCoins = sdk.Coins{sdk.NewInt64Coin("foocoin", 5)}
Expand Down Expand Up @@ -576,5 +578,26 @@ func TestHooks(t *testing.T) {
err = s.BankKeeper.InputOutputCoins(ctx, types.Input{Address: addr1.String(), Coins: triggerTrackSendAmount}, []types.Output{{Address: addr2.String(), Coins: triggerTrackSendAmount}})
require.NoError(t, err)
require.Equal(t, countTrackBeforeSend, expNextCount)
expNextCount++

multiSendTrackInput := types.Input{
Address: addr1.String(),
Coins: triggerTrackSendAmount.MulInt(sdkmath.NewInt(4)),
}
multiSendTrackOutput := []types.Output{{
Address: addr2.String(),
Coins: triggerTrackSendAmount,
}, {
Address: addr3.String(),
Coins: triggerTrackSendAmount,
}, {
Address: addr4.String(),
Coins: triggerTrackSendAmount,
}, {
Address: addr5.String(),
Coins: triggerTrackSendAmount,
}}
err = s.BankKeeper.InputOutputCoins(ctx, multiSendTrackInput, multiSendTrackOutput)
require.NoError(t, err)
expNextCount += 4
require.Equal(t, countTrackBeforeSend, expNextCount)
}

0 comments on commit d4597e1

Please sign in to comment.