OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / tendermint / tmlibs / pubsub / query / empty_test.go
1 package query_test
2
3 import (
4         "testing"
5
6         "github.com/stretchr/testify/assert"
7         "github.com/tendermint/tmlibs/pubsub/query"
8 )
9
10 func TestEmptyQueryMatchesAnything(t *testing.T) {
11         q := query.Empty{}
12         assert.True(t, q.Matches(map[string]interface{}{}))
13         assert.True(t, q.Matches(map[string]interface{}{"Asher": "Roth"}))
14         assert.True(t, q.Matches(map[string]interface{}{"Route": 66}))
15         assert.True(t, q.Matches(map[string]interface{}{"Route": 66, "Billy": "Blue"}))
16 }