summaryrefslogtreecommitdiff
path: root/plugins/broadcast/websockets/access_validator_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-05-05 16:39:22 +0300
committerValery Piashchynski <[email protected]>2021-05-05 16:39:22 +0300
commit4fa94bb7f73a705293c2afd40fc1151a3aaa04e2 (patch)
tree6ffd858cade87600bbd4432f70db22f50c598db0 /plugins/broadcast/websockets/access_validator_test.go
parent9ee78f937d5be67058882dd3590f89da35bca239 (diff)
- Initial broadcast commit
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/broadcast/websockets/access_validator_test.go')
-rw-r--r--plugins/broadcast/websockets/access_validator_test.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/plugins/broadcast/websockets/access_validator_test.go b/plugins/broadcast/websockets/access_validator_test.go
deleted file mode 100644
index 41372727..00000000
--- a/plugins/broadcast/websockets/access_validator_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package websockets
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestResponseWrapper_Body(t *testing.T) {
- w := newValidator()
- _, _ =w.Write([]byte("hello"))
-
- assert.Equal(t, []byte("hello"), w.Body())
-}
-
-func TestResponseWrapper_Header(t *testing.T) {
- w := newValidator()
- w.Header().Set("k", "value")
-
- assert.Equal(t, "value", w.Header().Get("k"))
-}
-
-func TestResponseWrapper_StatusCode(t *testing.T) {
- w := newValidator()
- w.WriteHeader(200)
-
- assert.True(t, w.IsOK())
-}
-
-func TestResponseWrapper_StatusCodeBad(t *testing.T) {
- w := newValidator()
- w.WriteHeader(400)
-
- assert.False(t, w.IsOK())
-}