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

Function TestLuaContextSendFailed

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

Source from the content-addressed store, hash-verified

211}
212
213func TestLuaContextSendFailed(t *testing.T) {
214 l := lua.NewState()
215 defer l.Close()
216 w := httptest.NewRecorder()
217 ctx, _ := gin.CreateTestContext(w)
218 ctx.Set(gin.BodyBytesKey, []byte("{}"))
219 initHttpLua(l, ctx)
220 if err := l.DoString(`ctx:send({})`); err != nil {
221 t.Fatal(err)
222 }
223}
224
225func TestLuaSendContext(t *testing.T) {
226 ctx := &luaSendContext{}

Callers

nothing calls this directly

Calls 2

initHttpLuaFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected