localcache_test.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaogetLocalLiveStreamListKey(t *testing.T) {
  8. convey.Convey("getLocalLiveStreamListKey", t, func(ctx convey.C) {
  9. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  10. p1 := d.getLocalLiveStreamListKey()
  11. ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
  12. ctx.So(p1, convey.ShouldNotBeNil)
  13. })
  14. })
  15. })
  16. }
  17. func TestDaoLoadLiveStreamList(t *testing.T) {
  18. convey.Convey("LoadLiveStreamList", t, func(ctx convey.C) {
  19. var (
  20. c = context.Background()
  21. rids = []int64{11891462}
  22. )
  23. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  24. p1 := d.LoadLiveStreamList(c, rids)
  25. ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
  26. ctx.So(p1, convey.ShouldNotBeNil)
  27. })
  28. })
  29. })
  30. }
  31. func TestDaoStoreLiveStreamList(t *testing.T) {
  32. convey.Convey("StoreLiveStreamList", t, func(ctx convey.C) {
  33. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  34. d.StoreLiveStreamList()
  35. ctx.Convey("No return values", func(ctx convey.C) {
  36. })
  37. })
  38. })
  39. }