report_test.go 556 B

12345678910111213141516171819202122232425
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "time"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoTaskTooksByHalfHour(t *testing.T) {
  9. convey.Convey("TaskTooksByHalfHour", t, func(ctx convey.C) {
  10. var (
  11. c = context.Background()
  12. stime = time.Now()
  13. etime = time.Now()
  14. )
  15. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  16. _, err := d.TaskTooksByHalfHour(c, stime, etime)
  17. ctx.Convey("Then err should be nil.tooks should not be nil.", func(ctx convey.C) {
  18. ctx.So(err, convey.ShouldBeNil)
  19. })
  20. })
  21. })
  22. }