image_test.go 314 B

123456789101112131415161718192021
  1. package getter
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/require"
  5. )
  6. func TestGetImage(t *testing.T) {
  7. tests := []struct {
  8. urlStr string
  9. }{
  10. {
  11. urlStr: "https://star-history.com/bytebase.webp",
  12. },
  13. }
  14. for _, test := range tests {
  15. _, err := GetImage(test.urlStr)
  16. require.NoError(t, err)
  17. }
  18. }