(t *testing.T, target, account string)
| 34 | } |
| 35 | |
| 36 | func createLink(t *testing.T, target, account string) string { |
| 37 | t.Helper() |
| 38 | w := httptest.NewRecorder() |
| 39 | CreateLink(w, requestAs(http.MethodPost, url.Values{"t": {target}}.Encode(), account)) |
| 40 | if w.Code != http.StatusOK { |
| 41 | t.Fatalf("CreateLink(%q) = %d %q", target, w.Code, w.Body.String()) |
| 42 | } |
| 43 | return strings.TrimSpace(w.Body.String()) |
| 44 | } |
| 45 | |
| 46 | func TestCreateLinkStoresTargetAndOwner(t *testing.T) { |
| 47 | resetLinks(t) |
no test coverage detected