mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-24 14:22:16 +00:00
24 lines
379 B
Go
24 lines
379 B
Go
|
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(),
|
||
|
)
|
||
|
}
|