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

  1. package core
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/assert"
  5. )
  6. func TestTx(t *testing.T) {
  7. addr0 := Address(HashBytes([]byte("addr0")))
  8. addr1 := Address(HashBytes([]byte("addr1")))
  9. tx := NewTx(addr0, addr1, []Input{}, []Output{})
  10. assert.Equal(t, tx.From, addr0)
  11. assert.Equal(t, tx.To, addr1)
  12. assert.True(t, CheckTx(tx))
  13. }