statisitcs_test.go 582 B

12345678910111213141516171819202122232425
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "time"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDao_GetStatisticsIDRange(t *testing.T) {
  9. Convey("GetStatisticsIDRange", t, func() {
  10. deadline, _ := time.Parse("2006-01-02 15:04:05", "2018-05-01 00:00:00")
  11. min, max, err := d.GetStatisticsIDRange(context.TODO(), deadline)
  12. So(err, ShouldBeNil)
  13. So(min, ShouldBeLessThanOrEqualTo, max)
  14. })
  15. }
  16. func TestDao_DelStatisticsByID(t *testing.T) {
  17. Convey("DelStatisticsByID", t, func() {
  18. _, err := d.DelStatisticsByID(context.TODO(), 1, 10)
  19. So(err, ShouldBeNil)
  20. })
  21. }