dm_manage_test.go 707 B

123456789101112131415161718192021222324252627282930313233
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestEditDMState(t *testing.T) {
  8. var (
  9. c = context.TODO()
  10. mid, oid int64 = 0, 5
  11. state int32 = 1
  12. dmids = []int64{719149905, 719149906, 719149907}
  13. )
  14. Convey("test edit dm state", t, func() {
  15. err := svr.EditDMState(c, 1, mid, oid, state, dmids, 0, 0)
  16. So(err, ShouldBeNil)
  17. })
  18. }
  19. func TestEditDMPool(t *testing.T) {
  20. var (
  21. c = context.TODO()
  22. mid, oid int64 = 0, 5
  23. dmids = []int64{719149905, 719149906, 719149907}
  24. )
  25. Convey("test edit dm pool", t, func() {
  26. err := svr.EditDMPool(c, 1, mid, oid, 1, dmids, 0, 0)
  27. So(err, ShouldBeNil)
  28. })
  29. }