(t *testing.T)
| 87 | } |
| 88 | |
| 89 | func 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 | |
| 102 | func TestGetHttpLuaNoReturn(t *testing.T) { |
| 103 | l := lua.NewState() |
nothing calls this directly
no test coverage detected