up_base_test.go 606 B

1234567891011121314151617181920212223242526
  1. package card
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestCardListUpBase(t *testing.T) {
  8. convey.Convey("ListUpBase", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. size = int(3)
  12. lastID = int64(1)
  13. where = "AND activity = 1"
  14. )
  15. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  16. idMids, err := d.ListUpBase(c, size, lastID, where)
  17. ctx.Convey("Then err should be nil.idMids should not be nil.", func(ctx convey.C) {
  18. ctx.So(err, convey.ShouldBeNil)
  19. ctx.So(idMids, convey.ShouldNotBeNil)
  20. })
  21. })
  22. })
  23. }