Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package router
import (
"testing"
"github.com/gin-gonic/gin"
)
func TestDramaRoutesExcludeServerProgress(t *testing.T) {
gin.SetMode(gin.TestMode)
engine := gin.New()
dramaRouter(engine.Group("/api/app"))
routes := make(map[string]struct{})
for _, route := range engine.Routes() {
routes[route.Method+" "+route.Path] = struct{}{}
}
if _, ok := routes["POST /api/app/media/drama/progress"]; ok {
t.Fatal("server-side drama progress route must not be registered")
}
if _, ok := routes["POST /api/app/media/drama/events"]; !ok {
t.Fatal("drama analytics route must remain registered")
}
if _, ok := routes["GET /api/app/media/drama/card/products"]; ok {
t.Fatal("standalone drama card product route must not be registered")
}
}