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"
"go-common/app/admin/main/open/model"
"github.com/smartystreets/goconvey/convey"
)
func TestDaoAddApp(t *testing.T) {
convey.Convey("AddApp", t, func() {
p1 := d.AddApp(context.TODO(), nil)
convey.So(p1, convey.ShouldBeNil)
})
}
func TestDaoDelApp(t *testing.T) {
convey.Convey("DelApp", t, func() {
p1 := d.DelApp(context.TODO(), 0)
convey.So(p1, convey.ShouldBeNil)
})
}
func TestDaoUpdateApp(t *testing.T) {
bean := &model.AppParams{
AppID: 123,
AppName: "xxx",
}
convey.Convey("UpdateApp", t, func() {
p1 := d.UpdateApp(context.TODO(), bean)
convey.So(p1, convey.ShouldBeNil)
})
}
func TestDaoListApp(t *testing.T) {
convey.Convey("ListApp", t, func() {
res, err := d.ListApp(context.TODO(), nil)
convey.So(err, convey.ShouldBeNil)
convey.So(res, convey.ShouldNotBeNil)
})
}