resource_test.go 505 B

123456789101112131415161718192021222324
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestService_Kv(t *testing.T) {
  8. Convey("test baidu Kv", t, WithService(func(s *Service) {
  9. res, err := s.Kv(context.Background())
  10. So(err, ShouldBeNil)
  11. So(len(res), ShouldBeGreaterThan, 0)
  12. }))
  13. }
  14. func TestService_CmtBox(t *testing.T) {
  15. Convey("test cmtbox", t, WithService(func(s *Service) {
  16. res, err := s.CmtBox(context.Background(), 1)
  17. So(err, ShouldBeNil)
  18. So(res, ShouldNotBeNil)
  19. }))
  20. }