From 1236f11ca24abe38a646f75c467246a80c853a5f Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 6 Oct 2016 15:44:09 +0000 Subject: Footer: updating URLs --- test/lib/link_checker.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') 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}" -- cgit v1.2.3