Files
Rogeeandrogee 2b182f9956 H-300: wire Captain Skills into Web runtime (#48)
* H-300: wire Captain Skills into Web runtime

* H-300: enforce effective model and conservative skill budget

* H-300: fix CI gosec step

* ci: extend golangci-lint timeout

* fix lint findings across backend

* fix(push): resolve delivery protocol blockers

* test(repository): close SQLite test databases

* test(repository): reuse SQLite schema per package

* H-307: restore backend Go cache in CI

* H-307: prefetch modules before cold lint

* H-307: resolve govulncheck security gate

* H-307: build lint with patched Go toolchain

* H-307: clear remaining security scan findings

---------

Co-authored-by: Rogee <rogee@ipao.vip>
2026-08-19 07:08:14 +08:00

45 lines
1.0 KiB
Go

package router
import (
"testing"
"github.com/gin-gonic/gin"
"github.com/gochat/gochat/internal/model"
"gorm.io/gorm"
)
func safeCall_Cov2(fn func()) { defer func() { _ = recover() }(); fn() }
func TestRegisterEnterpriseRoutes_Nil_Cov2(t *testing.T) {
safeCall_Cov2(func() {
gin.SetMode(gin.TestMode)
g := gin.New()
registerEnterpriseRoutes(g.Group("/api"), &Handlers{})
})
}
func TestTwilioCallStatus_Cov2(t *testing.T) {
require := func(v, expected string) {
if v != expected {
t.Errorf("expected %s, got %s", expected, v)
}
}
_ = require
_ = twilioCallStatus("ringing")
_ = twilioCallStatus("in-progress")
_ = twilioCallStatus("completed")
_ = twilioCallStatus("unknown")
}
func TestTwilioConferenceEvent_Cov2(t *testing.T) {
_ = twilioConferenceEvent("participant-join")
_ = twilioConferenceEvent("participant-leave")
_ = twilioConferenceEvent("unknown")
}
func TestUpsertIntegrationHook_Nil_Cov2(t *testing.T) {
safeCall_Cov2(func() {
_ = upsertIntegrationHook(nil, &gorm.DB{}, 1, model.HookType(""), "", "", nil)
})
}