package client import "testing" func TestInterchainQuery(t *testing.T) { cases := []struct { name string opts []InterchainOption want string }{ {"none", nil, ""}, {"perChain1", []InterchainOption{WithPerChain(1)}, "?perChain=1"}, {"perChain0 (all)", []InterchainOption{WithPerChain(0)}, "?perChain=0"}, {"chains", []InterchainOption{WithChains("1", "0")}, "?chains=1,0"}, {"both", []InterchainOption{WithPerChain(2), WithChains("1", "0")}, "?perChain=2&chains=1,0"}, } for _, c := range cases { if got := InterchainQuery(c.opts...); got != c.want { t.Errorf("%s: InterchainQuery = %q, want %q", c.name, got, c.want) } } }