(t *testing.T)
| 362 | } |
| 363 | |
| 364 | func TestMagicLinkPOSTMissingToken(t *testing.T) { |
| 365 | server, _, _, smtpDone := setupMagicLinkAPI(t) |
| 366 | defer smtpDone() |
| 367 | |
| 368 | resp := postForm(t, server.URL+"/v1/approve", map[string]string{}) |
| 369 | defer resp.Body.Close() |
| 370 | if resp.StatusCode != http.StatusBadRequest { |
| 371 | t.Errorf("status = %d, want 400", resp.StatusCode) |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | func TestMagicLinkGETInvalidToken(t *testing.T) { |
| 376 | server, _, _, smtpDone := setupMagicLinkAPI(t) |
nothing calls this directly
no test coverage detected