19 lines
273 B
Go
19 lines
273 B
Go
|
package types
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
func TestResult(t *testing.T) {
|
||
|
var res Result
|
||
|
require.True(t, res.IsOK())
|
||
|
|
||
|
res.Data = []byte("data")
|
||
|
require.True(t, res.IsOK())
|
||
|
|
||
|
res.Code = ABCICodeType(1)
|
||
|
require.False(t, res.IsOK())
|
||
|
}
|