You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
344 B

package core
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestTx(t *testing.T) {
addr0 := Address(HashBytes([]byte("addr0")))
addr1 := Address(HashBytes([]byte("addr1")))
tx := NewTx(addr0, addr1, []Input{}, []Output{})
assert.Equal(t, tx.From, addr0)
assert.Equal(t, tx.To, addr1)
assert.True(t, CheckTx(tx))
}