aboutsummaryrefslogtreecommitdiff
path: root/brokenlinks/brokenlinks_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'brokenlinks/brokenlinks_test.go')
-rw-r--r--brokenlinks/brokenlinks_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/brokenlinks/brokenlinks_test.go b/brokenlinks/brokenlinks_test.go
index ab857cd..460e5ac 100644
--- a/brokenlinks/brokenlinks_test.go
+++ b/brokenlinks/brokenlinks_test.go
@@ -281,16 +281,19 @@ func TestScan(t *testing.T) {
testUrl + `/`: []jarink.Link{
{
ParentUrl: parsedTestUrl,
+ Value: `/broken.png`,
Url: testUrl + `/broken.png`,
StatusCode: http.StatusNotFound,
Kind: int(atom.Img),
}, {
ParentUrl: parsedTestUrl,
+ Value: `/brokenPage`,
Url: testUrl + `/brokenPage`,
StatusCode: http.StatusNotFound,
Kind: int(atom.A),
}, {
ParentUrl: parsedTestUrl,
+ Value: `http://127.0.0.1:abc`,
Url: `http://127.0.0.1:abc`,
ErrScan: errScanPort,
Error: `parse "http://127.0.0.1:abc": invalid port ":abc" after host`,
@@ -298,6 +301,7 @@ func TestScan(t *testing.T) {
Kind: int(atom.A),
}, {
ParentUrl: parsedTestUrl,
+ Value: `http:/127.0.0.1:11836`,
Url: `http:/127.0.0.1:11836`,
ErrScan: &url.Error{
Op: `Get`,
@@ -310,6 +314,7 @@ func TestScan(t *testing.T) {
IsExternal: true,
}, {
ParentUrl: parsedTestUrl,
+ Value: `https://domain`,
Url: `https://domain`,
ErrScan: &url.Error{
Op: `Get`,
@@ -333,6 +338,7 @@ func TestScan(t *testing.T) {
testUrl + `/broken.html`: []jarink.Link{
{
ParentUrl: parsedUrlBrokenHtml,
+ Value: `/brokenPage`,
Url: testUrl + `/brokenPage`,
StatusCode: http.StatusNotFound,
Kind: int(atom.A),
@@ -341,16 +347,19 @@ func TestScan(t *testing.T) {
testUrl + `/page2/`: []jarink.Link{
{
ParentUrl: parsedUrlPage2,
+ Value: `/broken.png`,
Url: testUrl + `/broken.png`,
StatusCode: http.StatusNotFound,
Kind: int(atom.Img),
}, {
ParentUrl: parsedUrlPage2,
+ Value: `broken/relative`,
Url: testUrl + `/page2/broken/relative`,
StatusCode: http.StatusNotFound,
Kind: int(atom.A),
}, {
ParentUrl: parsedUrlPage2,
+ Value: `broken2.png`,
Url: testUrl + `/page2/broken2.png`,
StatusCode: http.StatusNotFound,
Kind: int(atom.Img),
@@ -368,17 +377,20 @@ func TestScan(t *testing.T) {
testUrl + `/page2/`: []jarink.Link{
{
ParentUrl: parsedUrlPage2,
+ Value: `/broken.png`,
Url: testUrl + `/broken.png`,
StatusCode: http.StatusNotFound,
Kind: int(atom.Img),
IsExternal: true,
}, {
ParentUrl: parsedUrlPage2,
+ Value: `broken/relative`,
Url: testUrl + `/page2/broken/relative`,
StatusCode: http.StatusNotFound,
Kind: int(atom.A),
}, {
ParentUrl: parsedUrlPage2,
+ Value: `broken2.png`,
Url: testUrl + `/page2/broken2.png`,
StatusCode: http.StatusNotFound,
Kind: int(atom.Img),
@@ -442,17 +454,20 @@ func TestScan_pastResult(t *testing.T) {
testUrl + `/page2/`: []jarink.Link{
{
ParentUrl: parsedUrlPage2,
+ Value: `/broken.png`,
Url: testUrl + `/broken.png`,
StatusCode: http.StatusNotFound,
Kind: int(atom.Img),
IsExternal: true,
}, {
ParentUrl: parsedUrlPage2,
+ Value: `broken/relative`,
Url: testUrl + `/page2/broken/relative`,
StatusCode: http.StatusNotFound,
Kind: int(atom.A),
}, {
ParentUrl: parsedUrlPage2,
+ Value: `broken2.png`,
Url: testUrl + `/page2/broken2.png`,
StatusCode: http.StatusNotFound,
Kind: int(atom.Img),