(t *testing.T)
| 158 | } |
| 159 | |
| 160 | func TestMessageDirectlyAfterConnect(t *testing.T) { |
| 161 | mode.Set(mode.Prod) |
| 162 | defer leaktest.Check(t)() |
| 163 | server, api := bootTestServer(staticUserID()) |
| 164 | defer server.Close() |
| 165 | defer api.Close() |
| 166 | |
| 167 | wsURL := wsURL(server.URL) |
| 168 | |
| 169 | user := testClient(t, wsURL) |
| 170 | defer user.conn.Close() |
| 171 | |
| 172 | waitForConnectedClients(api, 1) |
| 173 | |
| 174 | api.Notify(1, &model.MessageExternal{Message: "msg"}) |
| 175 | user.expectMessage(&model.MessageExternal{Message: "msg"}) |
| 176 | } |
| 177 | |
| 178 | func TestDeleteClientShouldCloseConnection(t *testing.T) { |
| 179 | mode.Set(mode.Prod) |
nothing calls this directly
no test coverage detected
searching dependent graphs…