frozen_test.go 521 B

12345678910111213141516171819202122232425262728293031
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/job/main/vip/model"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. var (
  9. ctx = context.TODO()
  10. )
  11. func Test_Frozen(t *testing.T) {
  12. Convey("test user frozen", t, func() {
  13. la := []uint32{1, 2, 3, 4, 5}
  14. for _, i := range la {
  15. s.dao.AddLogginIP(ctx, 7593666, i)
  16. }
  17. s.Frozen(ctx, &model.LoginLog{Mid: 7593666, IP: 234566})
  18. })
  19. }
  20. func Test_UnFrozen(t *testing.T) {
  21. Test_Frozen(t)
  22. Convey("test user unfrozen", t, func() {
  23. s.unFrozenJob()
  24. })
  25. }