aboutsummaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/link_checker.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/lib/link_checker.rb b/test/lib/link_checker.rb
index 15449144..36cb36c8 100644
--- a/test/lib/link_checker.rb
+++ b/test/lib/link_checker.rb
@@ -1,4 +1,6 @@
+SKIP = "mailto:"
+
class LinkChecker
end
@@ -12,7 +14,7 @@ describe LinkChecker do
page = @agent.get($host)
page.links.each do |link|
puts link.href
- if link.href !~ /static\/dbdoc\/Hippocampus/ and link.href !~ /glossary.html|sample_r|grits.eecs.utk.edu|correlationAnnotation.html/
+ if link.href !~ /#{SKIP}/ # /static\/dbdoc\/Hippocampus/ and link.href !~ /mailto:|glossary.html|sample_r|grits.eecs.utk.edu|correlationAnnotation.html/
# Fetch link, program will crash with exception if link is broken
linkpage = @agent.get(link.href)
puts "Link to #{link.href} is valid, response code #{linkpage.code}"
@@ -34,7 +36,7 @@ describe LinkChecker do
# Test every link on the page to check if it's broken or not
page.links.each do |link|
puts link.href
- if link.href !~ /static\/dbdoc\/Hippocampus/ and link.href !~ /glossary.html|sample_r|grits.eecs.utk.edu|correlationAnnotation.html/
+ if link.href !~ /#{SKIP}/ # /static\/dbdoc\/Hippocampus/ and link.href !~ /mailto:|glossary.html|sample_r|grits.eecs.utk.edu|correlationAnnotation.html/
# Fetch link, program will crash with exception if link is broken
linkpage = @agent.get(link.href)
puts "Link to #{link.href} is valid, response code #{linkpage.code}"