block_test.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/admin/main/reply/model"
  5. "testing"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoBlockAccount(t *testing.T) {
  9. convey.Convey("BlockAccount", t, func(ctx convey.C) {
  10. var (
  11. c = context.Background()
  12. mid = int64(0)
  13. ftime = int64(0)
  14. notify bool
  15. freason = int32(0)
  16. originTitle = ""
  17. originContent = ""
  18. redirectURL = ""
  19. adname = ""
  20. remark = ""
  21. )
  22. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  23. err := _d.BlockAccount(c, mid, ftime, notify, freason, originTitle, originContent, redirectURL, adname, remark)
  24. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  25. ctx.So(err, convey.ShouldNotBeNil)
  26. })
  27. })
  28. })
  29. }
  30. func TestDaoTransferArbitration(t *testing.T) {
  31. convey.Convey("TransferArbitration", t, func(ctx convey.C) {
  32. var (
  33. c = context.Background()
  34. rps map[int64]*model.Reply
  35. rpts map[int64]*model.Report
  36. adid = int64(0)
  37. adname = ""
  38. titles map[int64]string
  39. links map[int64]string
  40. )
  41. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  42. err := _d.TransferArbitration(c, rps, rpts, adid, adname, titles, links)
  43. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  44. ctx.So(err, convey.ShouldBeNil)
  45. })
  46. })
  47. })
  48. }