order_admin_test.go 651 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package service
  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 60003", t, func() {
  14. err := s.AddOrderAdmin(&oa)
  15. So(err, ShouldNotBeNil)
  16. })
  17. Convey("test QueryOrderAdmin 60003", t, func() {
  18. var admin *model.OrderAdmin
  19. admin, _ = s.QueryOrderAdmin(oa.UserName)
  20. So(admin, ShouldNotBeNil)
  21. })
  22. Convey("test AddOrderAdmin", t, func() {
  23. var oak = model.OrderAdmin{
  24. UserName: "hukai",
  25. }
  26. err := s.AddOrderAdmin(&oak)
  27. So(err, ShouldBeNil)
  28. })
  29. }