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.
 
 
 
 
 
 

27 lines
489 B

package types
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func TestQueryTxFor(t *testing.T) {
tx := Tx("foo")
assert.Equal(t,
fmt.Sprintf("tm.event = 'Tx' AND tx.hash = '%X'", tx.Hash()),
EventQueryTxFor(tx).String(),
)
}
func TestQueryForEvent(t *testing.T) {
assert.Equal(t,
"tm.event = 'NewBlock'",
QueryForEvent(EventNewBlockValue).String(),
)
assert.Equal(t,
"tm.event = 'NewEvidence'",
QueryForEvent(EventNewEvidenceValue).String(),
)
}