MCPcopy Create free account
hub / github.com/crewjam/saml / createLink

Function createLink

example/service_test.go:36–44  ·  view source on GitHub ↗
(t *testing.T, target, account string)

Source from the content-addressed store, hash-verified

34}
35
36func 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
46func TestCreateLinkStoresTargetAndOwner(t *testing.T) {
47 resetLinks(t)

Calls 5

CreateLinkFunction · 0.85
requestAsFunction · 0.85
FatalfMethod · 0.80
StringMethod · 0.80
EncodeMethod · 0.65

Tested by

no test coverage detected