package v1 import ( "testing" "github.com/gin-gonic/gin" "github.com/stretchr/testify/require" ) func TestPlatformAppIDSupportsBothRoutes(t *testing.T) { for _, params := range []gin.Param{ {Key: "id", Value: "7"}, {Key: "platform_app_id", Value: "7"}, } { ctx, _ := gin.CreateTestContext(nil) ctx.Params = []gin.Param{params} id, err := platformAppID(ctx) require.NoError(t, err) require.Equal(t, uint(7), id) } }