|
|
|
@ -5,7 +5,7 @@ import (
|
|
|
|
|
"testing" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
func Test_LinkInfoApi_detectContentType(t *testing.T) { |
|
|
|
|
func TestLinkInfoApi_detectContentType(t *testing.T) { |
|
|
|
|
api := New() |
|
|
|
|
|
|
|
|
|
contentType := api.detectContentType("http://example.com", "") |
|
|
|
@ -23,7 +23,7 @@ func Test_LinkInfoApi_detectContentType(t *testing.T) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func Test_LinkInfoApi_defaultLinkHandler(t *testing.T) { |
|
|
|
|
func TestLinkInfoApi_defaultLinkHandler(t *testing.T) { |
|
|
|
|
type expectedData struct { |
|
|
|
|
Link string |
|
|
|
|
Title string |
|
|
|
@ -54,7 +54,7 @@ func Test_LinkInfoApi_defaultLinkHandler(t *testing.T) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func Test_LinkInfoApi_retrieveHtmlLinkTitle(t *testing.T) { |
|
|
|
|
func TestLinkInfoApi_retrieveHtmlLinkTitle(t *testing.T) { |
|
|
|
|
ret := &LinkInfo{} |
|
|
|
|
|
|
|
|
|
api := New() |
|
|
|
|