diff --git a/x/inflation/keeper/keeper_test.go b/x/inflation/keeper/keeper_test.go index 4100e13c8..a967d3dec 100644 --- a/x/inflation/keeper/keeper_test.go +++ b/x/inflation/keeper/keeper_test.go @@ -42,9 +42,12 @@ func TestBurn(t *testing.T) { ) // Burn coins + supplyBefore := nibiruApp.BankKeeper.GetSupply(ctx, "unibi") err := nibiruApp.InflationKeeper.Burn(ctx, sdk.NewCoins(tc.burnCoin), tc.sender) if tc.expectedErr != nil { require.EqualError(t, err, tc.expectedErr.Error()) + supplyAfter := nibiruApp.BankKeeper.GetSupply(ctx, "unibi") + require.EqualValues(t, tc.burnCoin, supplyBefore.Sub(supplyAfter)) } else { require.NoError(t, err) } diff --git a/x/inflation/keeper/msg_server_test.go b/x/inflation/keeper/msg_server_test.go index 49cfa1620..501b8c6ce 100644 --- a/x/inflation/keeper/msg_server_test.go +++ b/x/inflation/keeper/msg_server_test.go @@ -74,18 +74,23 @@ func TestMsgEditInflationParams(t *testing.T) { func TestMsgBurn(t *testing.T) { app, ctx := testapp.NewNibiruTestAppAndContext() sender := testutil.AccAddress() + err := app.BankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin("unibi", sdk.NewInt(100)))) require.NoError(t, err) err = app.BankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, sender, sdk.NewCoins(sdk.NewCoin("unibi", sdk.NewInt(100)))) require.NoError(t, err) msgServer := keeper.NewMsgServerImpl(app.InflationKeeper) - + supplyBefore := app.BankKeeper.GetSupply(ctx, "unibi") + coinToBurn := sdk.NewCoin("unibi", sdk.NewInt(100)) msg := types.MsgBurn{ Sender: sender.String(), - Coin: sdk.NewCoin("unibi", sdk.NewInt(100)), + Coin: coinToBurn, } _, err = msgServer.Burn(ctx, &msg) require.NoError(t, err) + + supplyAfter := app.BankKeeper.GetSupply(ctx, "unibi") + require.EqualValues(t, coinToBurn, supplyBefore.Sub(supplyAfter)) }