up_quality_info_test.go 646 B

123456789101112131415161718192021222324252627
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoGetUpQuality(t *testing.T) {
  8. convey.Convey("GetUpQuality", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. table = "up_quality_info_11"
  12. id = int64(0)
  13. limit = int(100)
  14. )
  15. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  16. up, last, err := d.GetUpQuality(c, table, id, limit)
  17. ctx.Convey("Then err should be nil.up,last should not be nil.", func(ctx convey.C) {
  18. ctx.So(err, convey.ShouldBeNil)
  19. ctx.So(last, convey.ShouldNotBeNil)
  20. ctx.So(up, convey.ShouldNotBeNil)
  21. })
  22. })
  23. })
  24. }