github.com/supragya/TendermintConnector@v0.0.0-20210619045051-113e32b84fb1/_deprecated_chains/cosmos/libs/pubsub/query/empty_test.go (about)

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