aboutsummaryrefslogtreecommitdiff
path: root/brokenlinks_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'brokenlinks_test.go')
-rw-r--r--brokenlinks_test.go25
1 files changed, 2 insertions, 23 deletions
diff --git a/brokenlinks_test.go b/brokenlinks_test.go
index c1a607f..1c43937 100644
--- a/brokenlinks_test.go
+++ b/brokenlinks_test.go
@@ -126,31 +126,10 @@ func TestBrokenlinks(t *testing.T) {
},
},
}, {
+ // Scanning on "/path" should not scan the the "/" or other
+ // pages other than below of "/path" itself.
scanUrl: testUrl + `/page2`,
exp: map[string][]jarink.Broken{
- testUrl: []jarink.Broken{
- {
- Link: testUrl + `/broken.png`,
- Code: http.StatusNotFound,
- }, {
- Link: testUrl + `/brokenPage`,
- Code: http.StatusNotFound,
- }, {
- Link: `http://127.0.0.1:abc`,
- Error: `parse "http://127.0.0.1:abc": invalid port ":abc" after host`,
- Code: jarink.StatusBadLink,
- }, {
- Link: `http:/127.0.0.1:11836`,
- Error: `Head "http:/127.0.0.1:11836": http: no Host in request URL`,
- Code: jarink.StatusBadLink,
- },
- },
- testUrl + `/broken.html`: []jarink.Broken{
- {
- Link: testUrl + `/brokenPage`,
- Code: http.StatusNotFound,
- },
- },
testUrl + `/page2`: []jarink.Broken{
{
Link: testUrl + `/broken.png`,