fix topic validation (#74)

* fix topic validation

* fix tests
This commit is contained in:
Dominic Wong
2021-03-19 13:29:53 +00:00
committed by GitHub
parent 8dfe49f813
commit a711e10961
5 changed files with 88 additions and 16 deletions

View File

@@ -207,7 +207,7 @@ func TestSubscribe(t *testing.T) {
s := new(streamMock)
ctx = auth.ContextWithAccount(context.TODO(), &auth.Account{Issuer: "bar"})
err = h.Subscribe(ctx, &pb.SubscribeRequest{
Topic: "tok-for-diff",
Topic: "tok-for/diff",
Token: tRsp.Token,
}, s)
assert.Equal(t, handler.ErrInvalidTopic, err)