transfer_test.go 581 B

123456789101112131415161718192021222324252627282930313233
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. "go-common/app/job/main/dm2/model"
  7. )
  8. func TestTransferDMS(t *testing.T) {
  9. Convey("test NewCommentList", t, func() {
  10. ll, err := svr.transferDMS(context.TODO(), 1, 1012, 0, 10)
  11. So(err, ShouldBeNil)
  12. So(ll, ShouldNotBeEmpty)
  13. })
  14. }
  15. func TestTransfer(t *testing.T) {
  16. trans := &model.Transfer{
  17. ID: 265,
  18. FromCid: 1012,
  19. ToCid: 1211,
  20. Mid: 0,
  21. Dmid: 123,
  22. Offset: 0,
  23. State: 0,
  24. }
  25. Convey("transfer", t, func() {
  26. svr.transfer(context.TODO(), trans)
  27. })
  28. }