arnaucube
arnaucube/slowlorisdbPublic Self-hosted repository
slowlorisdb/core/tx_test.go
core/tx_test.goRaw
 1package core
 2
 3import (
 4	"testing"
 5
 6	"github.com/stretchr/testify/assert"
 7)
 8
 9func TestTx(t *testing.T) {
10	addr0 := Address(HashBytes([]byte("addr0")))
11	addr1 := Address(HashBytes([]byte("addr1")))
12
13	tx := NewTx(addr0, addr1, []Input{}, []Output{})
14
15	assert.Equal(t, tx.From, addr0)
16	assert.Equal(t, tx.To, addr1)
17
18	assert.True(t, CheckTx(tx))
19}