member_log_test.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/job/main/member/model"
  5. "testing"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoAddExpLog(t *testing.T) {
  9. convey.Convey("AddExpLog", t, func(convCtx convey.C) {
  10. var (
  11. ctx = context.Background()
  12. ul = &model.UserLog{}
  13. )
  14. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  15. d.AddExpLog(ctx, ul)
  16. convCtx.Convey("No return values", func(convCtx convey.C) {
  17. })
  18. })
  19. })
  20. }
  21. func TestDaoAddMoralLog(t *testing.T) {
  22. convey.Convey("AddMoralLog", t, func(convCtx convey.C) {
  23. var (
  24. ctx = context.Background()
  25. ul = &model.UserLog{}
  26. )
  27. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  28. d.AddMoralLog(ctx, ul)
  29. convCtx.Convey("No return values", func(convCtx convey.C) {
  30. })
  31. })
  32. })
  33. }
  34. func TestDaoaddLog(t *testing.T) {
  35. convey.Convey("addLog", t, func(convCtx convey.C) {
  36. var (
  37. ctx = context.Background()
  38. business = int(0)
  39. action = ""
  40. ul = &model.UserLog{}
  41. )
  42. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  43. d.addLog(ctx, business, action, ul)
  44. convCtx.Convey("No return values", func(convCtx convey.C) {
  45. })
  46. })
  47. })
  48. }