(t *testing.T)
| 373 | } |
| 374 | |
| 375 | func TestMagicLinkGETInvalidToken(t *testing.T) { |
| 376 | server, _, _, smtpDone := setupMagicLinkAPI(t) |
| 377 | defer smtpDone() |
| 378 | |
| 379 | resp, _ := http.Get(server.URL + "/v1/approve?t=gibberish") |
| 380 | defer resp.Body.Close() |
| 381 | if resp.StatusCode != http.StatusBadRequest { |
| 382 | t.Errorf("status = %d, want 400", resp.StatusCode) |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | func TestMagicLinkPOSTInvalidToken(t *testing.T) { |
| 387 | server, _, _, smtpDone := setupMagicLinkAPI(t) |
nothing calls this directly
no test coverage detected