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,50 @@
package service
import (
"context"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func Test_setRelationCache(t *testing.T) {
Convey("setRelationCache", t, func() {
var (
typ int8 = 2
mid int64 = 88888894
fid int64 = 289
)
err := s.setRelationCache(context.TODO(), typ, mid, fid)
t.Logf("err:%v", err)
So(err, ShouldBeNil)
})
}
func Test_folder(t *testing.T) {
Convey("folder", t, func() {
var (
typ int8 = 1
mid int64 = 88888894
fid int64 = 1
)
res, err := s.folder(context.TODO(), typ, mid, fid)
t.Logf("res:%v", res)
t.Logf("err:%v", err)
So(res, ShouldNotBeNil)
So(err, ShouldBeNil)
})
}
func Test_addCoin(t *testing.T) {
Convey("addMoney", t, func() {
var (
isAdd = true
count = 200
typ int8 = 1
oid int64 = 123
)
err := s.addCoin(context.TODO(), isAdd, count, typ, oid)
t.Logf("err:%v", err)
So(err, ShouldBeNil)
})
}