dao.cache_test.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package manager
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestManagerUpSpecial(t *testing.T) {
  8. convey.Convey("UpSpecial", t, func(convCtx convey.C) {
  9. var (
  10. c = context.Background()
  11. id = int64(27515256)
  12. )
  13. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  14. res, err := d.UpSpecial(c, id)
  15. convCtx.Convey("Then err should be nil.res should not be nil.", func(convCtx convey.C) {
  16. convCtx.So(err, convey.ShouldBeNil)
  17. convCtx.So(res, convey.ShouldNotBeNil)
  18. })
  19. })
  20. })
  21. }
  22. func TestManagerUpsSpecial(t *testing.T) {
  23. convey.Convey("UpsSpecial", t, func(convCtx convey.C) {
  24. var (
  25. c = context.Background()
  26. keys = []int64{27515256}
  27. )
  28. convCtx.Convey("When everything goes positive", func(convCtx convey.C) {
  29. res, err := d.UpsSpecial(c, keys)
  30. convCtx.Convey("Then err should be nil.res should not be nil.", func(convCtx convey.C) {
  31. convCtx.So(err, convey.ShouldBeNil)
  32. convCtx.So(res, convey.ShouldNotBeNil)
  33. })
  34. })
  35. })
  36. }