MCPcopy
hub / github.com/gorilla/websocket / TestIsWebSocketUpgrade

Function TestIsWebSocketUpgrade

server_test.go:48–55  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

46}
47
48func TestIsWebSocketUpgrade(t *testing.T) {
49 for _, tt := range isWebSocketUpgradeTests {
50 ok := IsWebSocketUpgrade(&http.Request{Header: tt.h})
51 if tt.ok != ok {
52 t.Errorf("IsWebSocketUpgrade(%v) returned %v, want %v", tt.h, ok, tt.ok)
53 }
54 }
55}
56
57var checkSameOriginTests = []struct {
58 ok bool

Callers

nothing calls this directly

Calls 1

IsWebSocketUpgradeFunction · 0.85

Tested by

no test coverage detected