mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
parent
b271c40783
commit
80399e60fb
23
types/events_test.go
Normal file
23
types/events_test.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
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(EventNewBlock).String(),
|
||||||
|
)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user