diff options
author | Pjotr Prins | 2016-10-06 15:44:09 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-10-06 15:44:09 +0000 |
commit | 1236f11ca24abe38a646f75c467246a80c853a5f (patch) | |
tree | 2a989a1642f398609e27e03c47d5a399473b95b5 /test/lib | |
parent | b3c2d2289c46f922f500e29fff5d146a8ababada (diff) | |
download | genenetwork2-1236f11ca24abe38a646f75c467246a80c853a5f.tar.gz |
Footer: updating URLs
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/link_checker.rb | 6 |
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}" |