2020-09-22 07:35:18 -07:00
|
|
|
package legacytx_test
|
2020-06-18 13:29:41 -07:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2020-06-29 07:05:30 -07:00
|
|
|
"github.com/stretchr/testify/suite"
|
2020-06-18 13:29:41 -07:00
|
|
|
|
2020-06-29 07:05:30 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
2020-09-13 19:21:29 -07:00
|
|
|
cryptoAmino "github.com/cosmos/cosmos-sdk/crypto/codec"
|
|
|
|
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
2020-06-29 07:05:30 -07:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
2020-09-22 07:35:18 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx"
|
2020-09-13 19:21:29 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/auth/testutil"
|
2020-06-29 07:05:30 -07:00
|
|
|
)
|
2020-06-18 13:29:41 -07:00
|
|
|
|
2020-08-10 12:41:21 -07:00
|
|
|
func testCodec() *codec.LegacyAmino {
|
2020-09-07 07:47:12 -07:00
|
|
|
cdc := codec.NewLegacyAmino()
|
|
|
|
sdk.RegisterLegacyAminoCodec(cdc)
|
2020-07-30 02:29:43 -07:00
|
|
|
cryptoAmino.RegisterCrypto(cdc)
|
2020-07-06 10:03:45 -07:00
|
|
|
cdc.RegisterConcrete(&testdata.TestMsg{}, "cosmos-sdk/Test", nil)
|
2020-06-29 07:05:30 -07:00
|
|
|
return cdc
|
|
|
|
}
|
2020-06-18 13:29:41 -07:00
|
|
|
|
2020-07-20 05:30:12 -07:00
|
|
|
func TestStdTxConfig(t *testing.T) {
|
2020-06-29 07:05:30 -07:00
|
|
|
cdc := testCodec()
|
2020-09-22 07:35:18 -07:00
|
|
|
txGen := legacytx.StdTxConfig{Cdc: cdc}
|
2020-07-20 05:30:12 -07:00
|
|
|
suite.Run(t, testutil.NewTxConfigTestSuite(txGen))
|
2020-06-18 13:29:41 -07:00
|
|
|
}
|