block_test.go 657 B

123456789101112131415161718192021222324252627282930313233
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaouserKey(t *testing.T) {
  8. var (
  9. mid = int64(0)
  10. )
  11. convey.Convey("userKey", t, func(ctx convey.C) {
  12. key := userKey(mid)
  13. ctx.Convey("Then key should not be nil.", func(ctx convey.C) {
  14. ctx.So(key, convey.ShouldNotBeNil)
  15. })
  16. })
  17. }
  18. func TestDaoDeleteUserBlockCache(t *testing.T) {
  19. var (
  20. c = context.Background()
  21. mid = int64(0)
  22. )
  23. convey.Convey("DeleteUserBlockCache", t, func(ctx convey.C) {
  24. err := d.DeleteUserBlockCache(c, mid)
  25. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  26. ctx.So(err, convey.ShouldBeNil)
  27. })
  28. })
  29. }