localuploader_test.go 459 B

123456789101112131415161718
  1. package imguploader
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestUploadToLocal(t *testing.T) {
  8. Convey("[Integration test] for external_image_store.local", t, func() {
  9. localUploader, _ := NewLocalImageUploader()
  10. path, err := localUploader.Upload(context.Background(), "../../../public/img/logo_transparent_400x.png")
  11. So(err, ShouldBeNil)
  12. So(path, ShouldContainSubstring, "/public/img/attachments")
  13. })
  14. }