go-common/app/admin/ep/melloi/service/order_admin_test.go
2019-04-22 18:49:16 +08:00

38 lines
651 B
Go

package service
import (
"testing"
"go-common/app/admin/ep/melloi/model"
. "github.com/smartystreets/goconvey/convey"
)
var (
oa = model.OrderAdmin{
UserName: "hujianping",
}
)
func Test_OrderAdmin(t *testing.T) {
Convey("test AddOrderAdmin 60003", t, func() {
err := s.AddOrderAdmin(&oa)
So(err, ShouldNotBeNil)
})
Convey("test QueryOrderAdmin 60003", t, func() {
var admin *model.OrderAdmin
admin, _ = s.QueryOrderAdmin(oa.UserName)
So(admin, ShouldNotBeNil)
})
Convey("test AddOrderAdmin", t, func() {
var oak = model.OrderAdmin{
UserName: "hukai",
}
err := s.AddOrderAdmin(&oak)
So(err, ShouldBeNil)
})
}