mc_test.go 877 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package roomAdmin
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestRoomAdminAddCacheNoneUser(t *testing.T) {
  8. convey.Convey("AddCacheNoneUser", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. uid = int64(0)
  12. )
  13. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  14. err := d.AddCacheNoneUser(c, uid)
  15. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. })
  18. })
  19. })
  20. }
  21. func TestRoomAdminAddCacheNoneRoom(t *testing.T) {
  22. convey.Convey("AddCacheNoneRoom", t, func(ctx convey.C) {
  23. var (
  24. c = context.Background()
  25. uid = int64(0)
  26. )
  27. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  28. err := d.AddCacheNoneRoom(c, uid)
  29. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  30. ctx.So(err, convey.ShouldBeNil)
  31. })
  32. })
  33. })
  34. }