MCPcopy
hub / github.com/cortesi/devd / TestDevdRouteHandler

Function TestDevdRouteHandler

server_test.go:52–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

50}
51
52func TestDevdRouteHandler(t *testing.T) {
53 logger := termlog.NewLog()
54 logger.Quiet()
55 r := Route{"", "/", fsEndpoint("./testdata")}
56 templates := ricetemp.MustMakeTemplates(rice.MustFindBox("templates"))
57 ci := inject.CopyInject{}
58
59 devd := Devd{LivereloadRoutes: true}
60 h := devd.WrapHandler(logger, r.Endpoint.Handler("", templates, ci))
61 ht := handlerTester{t, h}
62
63 AssertCode(t, ht.Request("GET", "/", nil), 200)
64}
65
66func TestDevdHandler(t *testing.T) {
67 logger := termlog.NewLog()

Callers

nothing calls this directly

Calls 5

WrapHandlerMethod · 0.95
RequestMethod · 0.95
fsEndpointFunction · 0.85
AssertCodeFunction · 0.85
HandlerMethod · 0.65

Tested by

no test coverage detected