summaryrefslogtreecommitdiff
path: root/href_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'href_test.go')
-rw-r--r--href_test.go34
1 files changed, 17 insertions, 17 deletions
diff --git a/href_test.go b/href_test.go
index dfeb091..430eafc 100644
--- a/href_test.go
+++ b/href_test.go
@@ -4,38 +4,38 @@ import "testing"
func TestTitle(t *testing.T) {
testCases := []struct {
- URL string
- Title string
+ url string
+ title string
}{
{
- URL: `https://www.linux.org.ru`,
- Title: `LINUX.ORG.RU - Русская информация об ОС Linux`,
+ url: `https://www.linux.org.ru`,
+ title: `LINUX.ORG.RU - Русская информация об ОС Linux`,
},
{
- URL: `http://www.opennet.ru`,
- Title: `Проект OpenNet - всё, что связано с открытым ПО, открытыми технологиями, Linux, BSD и Unix`,
+ url: `http://www.opennet.ru`,
+ title: `Проект OpenNet - всё, что связано с открытым ПО, открытыми технологиями, Linux, BSD и Unix`,
},
{
- URL: `http://www.openbsd.org`,
- Title: `OpenBSD`,
+ url: `http://www.openbsd.org`,
+ title: `OpenBSD`,
},
{
- URL: `http://undeadly.org`,
- Title: `OpenBSD Journal: A resource for the OpenBSD community`,
+ url: `http://undeadly.org`,
+ title: `OpenBSD Journal: A resource for the OpenBSD community`,
},
{
- URL: `https://github.com/dls/house/blob/master/kernel/SimpleExec.hs`,
- Title: `house/SimpleExec.hs at master · dls/house · GitHub`,
+ url: `https://github.com/dls/house/blob/master/kernel/SimpleExec.hs`,
+ title: `house/SimpleExec.hs at master · dls/house · GitHub`,
},
}
for _, tc := range testCases {
- t.Run(tc.URL, func(t *testing.T) {
- title, err := getTitle(tc.URL)
+ t.Run(tc.url, func(t *testing.T) {
+ title, err := getTitle(tc.url)
if err != nil {
- t.Error(tc.URL, err)
+ t.Error(tc.url, err)
}
- if title != tc.Title {
- t.Errorf("got %v, want %v", title, tc.Title)
+ if title != tc.title {
+ t.Errorf("got %v, want %v", title, tc.title)
}
})
}