order_admin_test.go 475 B

1234567891011121314151617181920212223242526272829
  1. package dao
  2. import (
  3. "testing"
  4. "go-common/app/admin/ep/melloi/model"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. var (
  8. oa = model.OrderAdmin{
  9. UserName: "hujianping",
  10. }
  11. )
  12. func Test_OrderAdmin(t *testing.T) {
  13. Convey("test AddOrderAdmin", t, func() {
  14. err := d.AddOrderAdmin(&oa)
  15. So(err, ShouldBeNil)
  16. })
  17. Convey("test QueryOrderAdmin", t, func() {
  18. var admin *model.OrderAdmin
  19. admin, _ = d.QueryOrderAdmin(oa.UserName)
  20. So(admin, ShouldNotBeNil)
  21. })
  22. }