oembed/is_valid_url_test.go
Maxim Lebedev 22aed18257
🚧 Created worked version of the package
Need documenting source code, checks by linters, add CI config
2019-05-23 19:52:58 +05:00

17 lines
316 B
Go

package oembed
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_IsValidURL(t *testing.T) {
assert := assert.New(t)
t.Run("invalid", func(t *testing.T) {
assert.False(isValidURL("str"))
})
t.Run("valid", func(t *testing.T) {
assert.True(isValidURL("http://www.kickstarter.com"))
})
}