relation_log_test.go 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/service/main/relation/model"
  5. "testing"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoAddFollowingLog(t *testing.T) {
  9. var (
  10. ctx = context.Background()
  11. rl = &model.RelationLog{}
  12. )
  13. convey.Convey("AddFollowingLog", t, func(cv convey.C) {
  14. d.AddFollowingLog(ctx, rl)
  15. cv.Convey("No return values", func(cv convey.C) {
  16. })
  17. })
  18. }
  19. func TestDaoDelFollowingLog(t *testing.T) {
  20. var (
  21. ctx = context.Background()
  22. rl = &model.RelationLog{}
  23. )
  24. convey.Convey("DelFollowingLog", t, func(cv convey.C) {
  25. d.DelFollowingLog(ctx, rl)
  26. cv.Convey("No return values", func(cv convey.C) {
  27. })
  28. })
  29. }
  30. func TestDaoDelFollowerLog(t *testing.T) {
  31. var (
  32. ctx = context.Background()
  33. rl = &model.RelationLog{}
  34. )
  35. convey.Convey("DelFollowerLog", t, func(cv convey.C) {
  36. d.DelFollowerLog(ctx, rl)
  37. cv.Convey("No return values", func(cv convey.C) {
  38. })
  39. })
  40. }
  41. func TestDaoAddWhisperLog(t *testing.T) {
  42. var (
  43. ctx = context.Background()
  44. rl = &model.RelationLog{}
  45. )
  46. convey.Convey("AddWhisperLog", t, func(cv convey.C) {
  47. d.AddWhisperLog(ctx, rl)
  48. cv.Convey("No return values", func(cv convey.C) {
  49. })
  50. })
  51. }
  52. func TestDaoDelWhisperLog(t *testing.T) {
  53. var (
  54. ctx = context.Background()
  55. rl = &model.RelationLog{}
  56. )
  57. convey.Convey("DelWhisperLog", t, func(cv convey.C) {
  58. d.DelWhisperLog(ctx, rl)
  59. cv.Convey("No return values", func(cv convey.C) {
  60. })
  61. })
  62. }
  63. func TestDaoAddBlackLog(t *testing.T) {
  64. var (
  65. ctx = context.Background()
  66. rl = &model.RelationLog{}
  67. )
  68. convey.Convey("AddBlackLog", t, func(cv convey.C) {
  69. d.AddBlackLog(ctx, rl)
  70. cv.Convey("No return values", func(cv convey.C) {
  71. })
  72. })
  73. }
  74. func TestDaoDelBlackLog(t *testing.T) {
  75. var (
  76. ctx = context.Background()
  77. rl = &model.RelationLog{}
  78. )
  79. convey.Convey("DelBlackLog", t, func(cv convey.C) {
  80. d.DelBlackLog(ctx, rl)
  81. cv.Convey("No return values", func(cv convey.C) {
  82. })
  83. })
  84. }
  85. func TestDaoaddLog(t *testing.T) {
  86. var (
  87. ctx = context.Background()
  88. business = int(0)
  89. action = ""
  90. rl = &model.RelationLog{}
  91. )
  92. convey.Convey("addLog", t, func(cv convey.C) {
  93. d.addLog(ctx, business, action, rl)
  94. cv.Convey("No return values", func(cv convey.C) {
  95. })
  96. })
  97. }