summaryrefslogtreecommitdiff
path: root/plugins/broadcast/websockets/conn_context_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/broadcast/websockets/conn_context_test.go')
-rw-r--r--plugins/broadcast/websockets/conn_context_test.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/plugins/broadcast/websockets/conn_context_test.go b/plugins/broadcast/websockets/conn_context_test.go
deleted file mode 100644
index 466aaa30..00000000
--- a/plugins/broadcast/websockets/conn_context_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package websockets
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestConnContext_ManageTopics(t *testing.T) {
- ctx := &ConnContext{Topics: make([]string, 0)}
-
- assert.Equal(t, []string{}, ctx.Topics)
-
- ctx.addTopics("a", "b")
- assert.Equal(t, []string{"a", "b"}, ctx.Topics)
-
- ctx.addTopics("a", "c")
- assert.Equal(t, []string{"a", "b", "c"}, ctx.Topics)
-
- ctx.dropTopic("b", "c")
- assert.Equal(t, []string{"a"}, ctx.Topics)
-
- ctx.dropTopic("b", "c")
- assert.Equal(t, []string{"a"}, ctx.Topics)
-
- ctx.dropTopic("a")
- assert.Equal(t, []string{}, ctx.Topics)
-}