aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2021-12-05 11:10:43 -0700
committerJordan <me@jordan.im>2021-12-05 11:10:43 -0700
commit11abb2a1122b25690b5713d9ecc3daa408da1448 (patch)
tree98d82cb576a5f4d5ecf54ed6f59d34241252ff64
parent22bda245fb3cb8da20cff8be53e0261c77240623 (diff)
downloadkeep-11abb2a1122b25690b5713d9ecc3daa408da1448.tar.gz
keep-11abb2a1122b25690b5713d9ecc3daa408da1448.zip
archive_test: invalid host WB test
-rw-r--r--archive_test.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/archive_test.go b/archive_test.go
index 7c4549e..e21fe40 100644
--- a/archive_test.go
+++ b/archive_test.go
@@ -10,10 +10,20 @@ func TestIsArchived(t *testing.T) {
url := "http://example.com/"
archived, status := isArchived(url)
if archived != true || status != 200 {
- t.Errorf("Received %t, %d: want %t, %d", archived, status, true, 200)
+ t.Errorf("Received %t, %d; want %t, %d", archived, status, true, 200)
}
}
+func TestIsNotArchived(t *testing.T) {
+
+ url := "http://invalidurl.local/"
+ archived, _ := isArchived(url)
+ if archived == true {
+ t.Errorf("Received %t; want %t", archived, false)
+ }
+}
+
+
func TestArchive200(t *testing.T) {
url := "http://example.com/"