types fee pool test
This commit is contained in:
parent
064f8b0b58
commit
16f5d69329
|
@ -1,6 +1,19 @@
|
|||
package types
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestTotalAccumUpdate(t *testing.T) {
|
||||
|
||||
ta := NewTotalAccum(0)
|
||||
|
||||
ta.Update(5, sdk.NewDec(3))
|
||||
require.True(DecEq(t, sdk.NewDec(15), ta.Accum))
|
||||
|
||||
ta.Update(8, sdk.NewDec(2))
|
||||
require.True(DecEq(t, sdk.NewDec(21), ta.Accum))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue