cosmos-sdk/x/staking/types/params_test.go

24 lines
374 B
Go

package types_test
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/cosmos/cosmos-sdk/x/staking/types"
)
func TestParamsEqual(t *testing.T) {
p1 := types.DefaultParams()
p2 := types.DefaultParams()
ok := p1.Equal(p2)
require.True(t, ok)
p2.UnbondingTime = 60 * 60 * 24 * 2
p2.BondDenom = "soup"
ok = p1.Equal(p2)
require.False(t, ok)
}