MCPcopy Create free account
hub / github.com/chanify/chanify / TestWebHookNotFound

Function TestWebHookNotFound

core/webhook_test.go:89–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

87}
88
89func TestWebHookNotFound(t *testing.T) {
90 c := New()
91 defer c.Close()
92 c.Init(&logic.Options{DBUrl: "sqlite://?mode=memory"}) // nolint: errcheck
93 w := httptest.NewRecorder()
94 ctx, _ := gin.CreateTestContext(w)
95 ctx.Request, _ = http.NewRequest("POST", "/v1/webhook/test", nil)
96 c.handlePostWebhook(ctx)
97 if w.Result().StatusCode != http.StatusNotFound {
98 t.Fatal("Check webhook failed")
99 }
100}
101
102func TestGetHttpLuaNoReturn(t *testing.T) {
103 l := lua.NewState()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
InitMethod · 0.80
handlePostWebhookMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected