archive_income_test.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package income
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func Test_ArchiveStatis(t *testing.T) {
  8. Convey("ArchiveStatis", t, WithService(func(s *Service) {
  9. categoryID := []int64{}
  10. groupType := 1
  11. var fromTime, endTime int64 = 1524240000000, 1526832000000
  12. _, err := s.ArchiveStatis(context.Background(), categoryID, 0, groupType, fromTime, endTime)
  13. So(err, ShouldBeNil)
  14. }))
  15. }
  16. func Test_ArchiveSection(t *testing.T) {
  17. Convey("ArchiveSection", t, WithService(func(s *Service) {
  18. categoryID := []int64{}
  19. groupType := 1
  20. var fromTime, endTime int64 = 1524240000000, 1526832000000
  21. _, err := s.ArchiveSection(context.Background(), categoryID, 0, groupType, fromTime, endTime)
  22. So(err, ShouldBeNil)
  23. }))
  24. }
  25. func Test_ArchiveDetail(t *testing.T) {
  26. Convey("ArchiveDetail", t, WithService(func(s *Service) {
  27. mid := int64(1)
  28. groupType := 1
  29. var fromTime, endTime int64 = 1524240000000, 1526832000000
  30. _, err := s.ArchiveDetail(context.Background(), mid, 0, groupType, fromTime, endTime)
  31. So(err, ShouldBeNil)
  32. }))
  33. }
  34. func Test_ArchiveTop(t *testing.T) {
  35. Convey("ArchiveTop", t, WithService(func(s *Service) {
  36. avIDs := []int64{}
  37. groupType := 1
  38. var fromTime, endTime int64 = 1524240000000, 1526832000000
  39. from, limit := 0, 10
  40. _, _, err := s.ArchiveTop(context.Background(), avIDs, 0, groupType, fromTime, endTime, from, limit)
  41. So(err, ShouldBeNil)
  42. }))
  43. }