publish_test.go 565 B

123456789101112131415161718192021222324252627
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "fmt"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestService_GendDiff(t *testing.T) {
  9. Convey("TestService_GendDiff", t, WithService(func(svf *Service) {
  10. generated, err := svf.GendDiff(57)
  11. So(err, ShouldBeNil)
  12. So(len(generated), ShouldBeGreaterThan, 0)
  13. fmt.Println(generated)
  14. }))
  15. }
  16. func TestService_Publish(t *testing.T) {
  17. Convey("TestService_Publish", t, WithService(func(svf *Service) {
  18. data, err := svf.Publish(context.Background(), 57)
  19. So(err, ShouldBeNil)
  20. fmt.Println(data)
  21. }))
  22. }