cheat_test.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func Test_CheatUps(t *testing.T) {
  8. mid := int64(1011)
  9. nickname := "helloworld"
  10. from, limit := 0, 1000
  11. Convey("admins", t, WithService(func(s *Service) {
  12. _, _, err := s.CheatUps(context.Background(), mid, nickname, from, limit)
  13. So(err, ShouldBeNil)
  14. }))
  15. }
  16. func Test_CheatArchives(t *testing.T) {
  17. mid, avID := int64(1011), int64(5011)
  18. nickname := "helloworld"
  19. from, limit := 0, 1000
  20. Convey("admins", t, WithService(func(s *Service) {
  21. _, _, err := s.CheatArchives(context.Background(), mid, avID, nickname, from, limit)
  22. So(err, ShouldBeNil)
  23. }))
  24. }
  25. func Test_ExportCheatUps(t *testing.T) {
  26. mid := int64(1011)
  27. nickname := "helloworld"
  28. from, limit := 0, 1000
  29. Convey("admins", t, WithService(func(s *Service) {
  30. res, err := s.ExportCheatUps(context.Background(), mid, nickname, from, limit)
  31. So(err, ShouldBeNil)
  32. So(len(res), ShouldBeGreaterThan, 0)
  33. }))
  34. }
  35. func Test_ExportCheatAvs(t *testing.T) {
  36. mid, avID := int64(1011), int64(5011)
  37. nickname := "helloworld"
  38. from, limit := 0, 1000
  39. Convey("admins", t, WithService(func(s *Service) {
  40. res, err := s.ExportCheatAvs(context.Background(), mid, avID, nickname, from, limit)
  41. So(err, ShouldBeNil)
  42. So(len(res), ShouldBeGreaterThan, 0)
  43. }))
  44. }