(t *testing.T)
| 95 | } |
| 96 | |
| 97 | func TestSubscribe(t *testing.T) { |
| 98 | c := subscriptions.NewDefaultClient() |
| 99 | |
| 100 | subs := []string{"", "sub1", "sub2", "sub3"} |
| 101 | expected := []string{"sub1", "sub2", "sub3"} |
| 102 | |
| 103 | c.Subscribe(subs...) // empty string should be skipped |
| 104 | |
| 105 | if len(c.Subscriptions()) != 3 { |
| 106 | t.Fatalf("Expected 3 subscriptions, got %v", c.Subscriptions()) |
| 107 | } |
| 108 | |
| 109 | for i, s := range expected { |
| 110 | if !c.HasSubscription(s) { |
| 111 | t.Errorf("(%d) Expected sub %s", i, s) |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | func TestSubscribeOptions(t *testing.T) { |
| 117 | c := subscriptions.NewDefaultClient() |
nothing calls this directly
no test coverage detected
searching dependent graphs…