MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / TestGetHook

Function TestGetHook

api/hooks_test.go:76–88  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestGetHook(t *testing.T) {
77 router, _, err := setupRouter(t)
78 if err != nil {
79 t.Fatalf("Failed to setup router: %v", err)
80 }
81
82 t.Run("Hook not found", func(t *testing.T) {
83 req := httptest.NewRequest("GET", "/hooks/hk_nonexistent", nil)
84 resp := httptest.NewRecorder()
85 router.ServeHTTP(resp, req)
86 assert.Equal(t, http.StatusNotFound, resp.Code)
87 })
88}
89
90func TestListHooks(t *testing.T) {
91 router, _, err := setupRouter(t)

Callers

nothing calls this directly

Calls 1

setupRouterFunction · 0.85

Tested by

no test coverage detected