MCPcopy
hub / github.com/perkeep/perkeep / TestImportRootPageHTML

Function TestImportRootPageHTML

pkg/importer/importer_test.go:70–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestImportRootPageHTML(t *testing.T) {
71 h, err := NewHost(HostConfig{})
72 if err != nil {
73 t.Fatal(err)
74 }
75 w := httptest.NewRecorder()
76 r := httptest.NewRequest("GET", "/importer/", nil)
77 h.serveImportersRoot(w, r)
78 if w.Code != 200 || !strings.Contains(w.Body.String(), "dummy1") {
79 t.Errorf("Got %d response with header %v, body %s", w.Code, w.Result().Header, w.Body.String())
80 }
81}

Callers

nothing calls this directly

Calls 7

serveImportersRootMethod · 0.95
NewHostFunction · 0.85
FatalMethod · 0.80
NewRequestMethod · 0.80
ContainsMethod · 0.80
ResultMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected