(t *testing.T)
| 397 | } |
| 398 | |
| 399 | func TestWebSocketDestroySystemTopicError(t *testing.T) { |
| 400 | ensureServer() |
| 401 | token := signUpAndGetToken(t) |
| 402 | |
| 403 | ws := dialWS(t, token) |
| 404 | defer ws.Close() |
| 405 | |
| 406 | // "world" is always a system topic |
| 407 | sendJSON(t, ws, wsPayload{ |
| 408 | Id: nextReqId(), |
| 409 | Method: "destroy-topicName", |
| 410 | Payload: map[string]interface{}{"name": "world"}, |
| 411 | }) |
| 412 | |
| 413 | msg := recvJSON(t, ws, 5*time.Second) |
| 414 | if msg.Type != "response" || msg.Ok == nil || *msg.Ok { |
| 415 | t.Errorf("expected error for system topic delete, got type=%q ok=%v", msg.Type, msg.Ok) |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | func TestWebSocketCreateDuplicateTopicError(t *testing.T) { |
| 420 | ensureServer() |
nothing calls this directly
no test coverage detected