user_act_log_test.go 994 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/service/main/account-recovery/model"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoNickNameLog(t *testing.T) {
  9. var (
  10. c = context.Background()
  11. nickNameReq = &model.NickNameReq{Mid: 111001254}
  12. )
  13. convey.Convey("NickNameLog", t, func(ctx convey.C) {
  14. res, err := d.NickNameLog(c, nickNameReq)
  15. ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. ctx.So(res, convey.ShouldNotBeNil)
  18. })
  19. })
  20. }
  21. func TestDaoUserBindLog(t *testing.T) {
  22. var (
  23. c = context.Background()
  24. emailReq = &model.UserBindLogReq{
  25. Action: "emailBindLog",
  26. Mid: 23,
  27. Size: 100,
  28. }
  29. )
  30. convey.Convey("UserBindLog", t, func(ctx convey.C) {
  31. res, err := d.UserBindLog(c, emailReq)
  32. ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) {
  33. ctx.So(err, convey.ShouldBeNil)
  34. ctx.So(res, convey.ShouldNotBeNil)
  35. })
  36. })
  37. }