cosmos-sdk/x/auth/stdtx_test.go
Christopher Goes 918e217e1f
Merge PR #1280: Implement simple transaction memos
* AltBytes -> Memo, memo CLI support & thread-through
* Check memo size, update changelog
* Update existing testcases
* Nuke CircleCI caches
* Charge gas proportional to memo size
* Fix gas allocations in ante handler testcases
* Add testcases
* Update changelog
* Fix tiny CLI bug & add to CLI tests
* Add '--memo' to gaiacli
* Add testcase for large memos
* Address PR comments
2018-06-20 21:27:36 +02:00

33 lines
605 B
Go

package auth
import (
"testing"
"github.com/stretchr/testify/assert"
crypto "github.com/tendermint/go-crypto"
sdk "github.com/cosmos/cosmos-sdk/types"
)
// func newStdFee() StdFee {
// return NewStdFee(100,
// Coin{"atom", 150},
// )
// }
func TestStdTx(t *testing.T) {
priv := crypto.GenPrivKeyEd25519()
addr := priv.PubKey().Address()
msg := sdk.NewTestMsg(addr)
fee := newStdFee()
sigs := []StdSignature{}
tx := NewStdTx(msg, fee, sigs, "")
assert.Equal(t, msg, tx.GetMsg())
assert.Equal(t, sigs, tx.GetSignatures())
feePayer := FeePayer(tx)
assert.Equal(t, addr, feePayer)
}