You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
901 B

package dao
import (
"context"
"go-common/app/service/main/tv/internal/model"
"testing"
"github.com/smartystreets/goconvey/convey"
)
func TestDaouserInfoKey(t *testing.T) {
convey.Convey("userInfoKey", t, func(ctx convey.C) {
var (
mid = int64(27515308)
)
ctx.Convey("When everything gose positive", func(ctx convey.C) {
p1 := userInfoKey(mid)
ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
ctx.So(p1, convey.ShouldNotBeNil)
})
})
})
}
func TestDaopayParamKey(t *testing.T) {
convey.Convey("payParamKey", t, func(ctx convey.C) {
var (
token = "TOKEN:34567345678"
)
d.AddCachePayParam(context.TODO(), token, &model.PayParam{})
ctx.Convey("When everything gose positive", func(ctx convey.C) {
p1 := payParamKey(token)
ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
ctx.So(p1, convey.ShouldNotBeNil)
})
})
})
}