mirror of
https://github.com/usememos/memos.git
synced 2024-12-29 00:21:52 +08:00
19 lines
334 B
Go
19 lines
334 B
Go
package httpgetter
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestGetHTMLMeta(t *testing.T) {
|
|
tests := []struct {
|
|
urlStr string
|
|
htmlMeta HTMLMeta
|
|
}{}
|
|
for _, test := range tests {
|
|
metadata, err := GetHTMLMeta(test.urlStr)
|
|
require.NoError(t, err)
|
|
require.Equal(t, test.htmlMeta, *metadata)
|
|
}
|
|
}
|