blocked_test.go 569 B

12345678910111213141516171819202122232425
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "time"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoCountBlocked(t *testing.T) {
  9. Convey("should return err be nil and num>=0", t, func() {
  10. num, err := d.CountBlocked(context.TODO(), 27515415, time.Now())
  11. So(err, ShouldBeNil)
  12. So(num, ShouldBeGreaterThanOrEqualTo, 0)
  13. })
  14. }
  15. func TestDaoBlockedInfoID(t *testing.T) {
  16. Convey("should return err be nil and num>=0", t, func() {
  17. id, err := d.BlockedInfoID(context.TODO(), 27515415)
  18. So(err, ShouldBeNil)
  19. So(id, ShouldBeGreaterThanOrEqualTo, 0)
  20. })
  21. }