grafana/pkg/components/imguploader/localuploader_test.go
2021-07-02 19:22:47 +08:00

19 lines
456 B
Go

package imguploader
import (
"context"
"testing"
"github.com/stretchr/testify/require"
)
func TestUploadToLocal(t *testing.T) {
t.Run("[Integration test] for external_image_store.local", func(t *testing.T) {
localUploader, _ := NewLocalImageUploader()
path, err := localUploader.Upload(context.Background(), "../../../public/img/logo_transparent_400x.png")
require.NoError(t, err)
require.Contains(t, path, "/public/img/attachments")
})
}