pgc_test.go 832 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/main/videoup/model/archive"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestService_ModifyByPGC(t *testing.T) {
  9. var (
  10. c = context.TODO()
  11. )
  12. attrs := make(map[uint]int32, 7)
  13. attrs[archive.AttrBitJumpURL] = 1
  14. attrs[archive.AttrBitAllowBp] = 1
  15. attrs[archive.AttrBitIsBangumi] = 1
  16. attrs[archive.AttrBitIsMovie] = 1
  17. attrs[archive.AttrBitBadgepay] = 1
  18. attrs[archive.AttrBitIsPGC] = 1
  19. attrs[archive.AttrBitLimitArea] = 0
  20. Convey("ModifyByPGC", t, WithService(func(s *Service) {
  21. err := svr.ModifyByPGC(c, 1, 1, attrs, "")
  22. So(err, ShouldBeNil)
  23. }))
  24. }
  25. func TestService_LockByPGC(t *testing.T) {
  26. var (
  27. c = context.TODO()
  28. )
  29. Convey("LockByPGC", t, WithService(func(s *Service) {
  30. err := svr.LockByPGC(c, 12345)
  31. So(err, ShouldBeNil)
  32. }))
  33. }