api_test.go 480 B

123456789101112131415161718192021222324
  1. package watermark
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestWatermarkGenWm(t *testing.T) {
  8. var (
  9. c = context.TODO()
  10. mid = int64(0)
  11. wmText = "text"
  12. ip = ""
  13. )
  14. convey.Convey("GenWm", t, func(ctx convey.C) {
  15. gm, err := d.GenWm(c, mid, wmText, ip)
  16. ctx.Convey("Then err should be nil.gm should not be nil.", func(ctx convey.C) {
  17. ctx.So(err, convey.ShouldBeNil)
  18. ctx.So(gm, convey.ShouldNotBeNil)
  19. })
  20. })
  21. }