@@ -0,0 +1,18 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func TestVIPCardAnalyticsRoute(t *testing.T) {
|
||||
engine := gin.New()
|
||||
analyticsRouter(engine.Group("/api/app"))
|
||||
for _, route := range engine.Routes() {
|
||||
if route.Method == "POST" && route.Path == "/api/app/analytics/events" {
|
||||
return
|
||||
}
|
||||
}
|
||||
t.Fatal("POST /api/app/analytics/events is not registered")
|
||||
}
|
||||
Reference in New Issue
Block a user