summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-03-22 08:25:49 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-03-22 08:25:49 +0100
commitb608c1a002c0bdcc5b31982b9823da50fb949de1 (patch)
tree19084026672d27300b84177f4009268786e6b9dc
parent4cbb6042235a29cfb07f0117dbcb92207dc0d8e3 (diff)
Update tests
-rw-r--r--flood_test.go2
-rw-r--r--href_test.go10
2 files changed, 6 insertions, 6 deletions
diff --git a/flood_test.go b/flood_test.go
index c2e087b..952b35f 100644
--- a/flood_test.go
+++ b/flood_test.go
@@ -48,7 +48,7 @@ var floodTestData = []floodTest{
func TestFlood(t *testing.T) {
for _, test := range floodTestData {
- if Flood(test.Input) != test.Result {
+ if isFlood(test.Input) != test.Result {
t.Error(test.Input, "expected", test.Result)
}
}
diff --git a/href_test.go b/href_test.go
index 0b0e2f6..f16795e 100644
--- a/href_test.go
+++ b/href_test.go
@@ -9,10 +9,6 @@ type titleTest struct {
var titleTestData = []titleTest{
{
- URL: `http://www.theinquirer.net/inquirer/news/2416607/linux-founder-says-you-must-be-on-drugs-if-youre-scared-of-ai`,
- Title: `Linux founder says you must be 'on drugs' if you're scared of AI- The Inquirer`,
- },
- {
URL: `https://www.linux.org.ru`,
Title: `LINUX.ORG.RU - Русская информация об ОС Linux`,
},
@@ -25,6 +21,10 @@ var titleTestData = []titleTest{
Title: `OpenBSD`,
},
{
+ URL: `http://undeadly.org`,
+ Title: `OpenBSD Journal: A resource for the OpenBSD community`,
+ },
+ {
URL: `https://www.reddit.com/r/nsfw`,
Title: `nsfw`,
},
@@ -32,7 +32,7 @@ var titleTestData = []titleTest{
func TestTitle(t *testing.T) {
for _, test := range titleTestData {
- title, err := FetchTitle(test.URL)
+ title, err := findTitle(test.URL)
if err != nil {
t.Error(test.URL, err)
}