recompute_test.go 492 B

1234567891011121314151617181920
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "time"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func Test_AvIncomes(t *testing.T) {
  9. Convey("growup-job AvIncomes", t, WithService(func(s *Service) {
  10. mid := int64(1)
  11. date := time.Now().Add(-24 * time.Hour)
  12. t := time.Date(date.Year(), date.Month(), date.Day(), 0, 0, 0, 0, time.Local)
  13. res, err := s.AvIncomes(context.Background(), mid, t.Format("2006-01-02 15:04:05"))
  14. So(err, ShouldBeNil)
  15. So(res, ShouldNotBeEmpty)
  16. }))
  17. }