(t *testing.T)
| 384 | } |
| 385 | |
| 386 | func TestMagicLinkPOSTInvalidToken(t *testing.T) { |
| 387 | server, _, _, smtpDone := setupMagicLinkAPI(t) |
| 388 | defer smtpDone() |
| 389 | |
| 390 | resp := postForm(t, server.URL+"/v1/approve", map[string]string{"t": "gibberish"}) |
| 391 | defer resp.Body.Close() |
| 392 | if resp.StatusCode != http.StatusBadRequest { |
| 393 | t.Errorf("status = %d, want 400", resp.StatusCode) |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | func TestMagicLinkExpiredToken(t *testing.T) { |
| 398 | server, store, signer, smtpDone := setupMagicLinkAPI(t) |
nothing calls this directly
no test coverage detected