Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
package dao
import (
"context"
"testing"
"time"
xtime "go-common/library/time"
. "github.com/smartystreets/goconvey/convey"
)
func Test_SelExp(t *testing.T) {
Convey("selExp", t, func() {
exp, err := d.SelExp(context.TODO(), 2233)
So(err, ShouldBeNil)
So(exp, ShouldNotBeEmpty)
})
}
func Test_UpdateExpAped(t *testing.T) {
Convey("updateExpAped", t, func() {
if _, err := d.UpdateExpAped(context.TODO(), 2233, 666, 1); err != nil {
So(err, ShouldBeNil)
}
})
}
func Test_InitExp(t *testing.T) {
Convey("InitExp", t, func() {
if err := d.InitExp(context.Background(), 1111); err != nil {
So(err, ShouldNotBeNil)
}
})
}
func Test_UpdateExpFlag(t *testing.T) {
Convey("UpdateExpFlag", t, func() {
if err := d.UpdateExpFlag(context.Background(), 1111, 123, xtime.Time(time.Now().Unix())); err != nil {
So(err, ShouldNotBeNil)
}
})
}