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,29 @@
package goblin
import (
"context"
"testing"
"go-common/library/database/sql"
"github.com/smartystreets/goconvey/convey"
)
func TestGoblinChlInfo(t *testing.T) {
var (
ctx = context.Background()
)
convey.Convey("ChlInfo", t, func(c convey.C) {
c.Convey("Then err should be nil.chls should not be nil.", func(c convey.C) {
chls, err := d.ChlInfo(ctx)
c.So(err, convey.ShouldBeNil)
c.So(chls, convey.ShouldNotBeNil)
})
c.Convey("db closed", func(c convey.C) {
d.db.Close()
_, err := d.ChlInfo(ctx)
c.So(err, convey.ShouldNotBeNil)
d.db = sql.NewMySQL(d.conf.Mysql)
})
})
}