github.com/evdatsion/aphelion-dpos-bft@v0.32.1/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/evdatsion/aphelion-dpos-bft/libs/pubsub/query"
     9  )
    10  
    11  func TestEmptyQueryMatchesAnything(t *testing.T) {
    12  	q := query.Empty{}
    13  	assert.True(t, q.Matches(map[string][]string{}))
    14  	assert.True(t, q.Matches(map[string][]string{"Asher": {"Roth"}}))
    15  	assert.True(t, q.Matches(map[string][]string{"Route": {"66"}}))
    16  	assert.True(t, q.Matches(map[string][]string{"Route": {"66"}, "Billy": {"Blue"}}))
    17  }