package routers import ( "testing" "github.com/gin-gonic/gin" ) func TestPlatformGasRouteUsesGasBasic(t *testing.T) { engine := gin.New() RegisterPlatform("heqi", engine) for _, route := range engine.Routes() { if route.Path == "/heqi/platform/v1/gas/gas_station" { t.Fatal("gas station route must use gas_basic as its resource name") } if route.Method == "GET" && route.Path == "/heqi/platform/v1/gas/gas_basic" { return } } t.Fatal("gas_basic list route is not registered") }