diff options
author | Pjotr Prins | 2016-10-07 10:34:32 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-10-07 10:34:32 +0000 |
commit | 420fd69ceda63871e9f6755112769c5615ed45f6 (patch) | |
tree | d834a125aaf99dcd04868a8907b097445f576b4b /test/lib/link_checker.rb | |
parent | 0f602fd058934feaaa37eb72d055bfcfcfc9ef8f (diff) | |
parent | 28da8f4304f406b4eff5ad68757735a0cb524e94 (diff) | |
download | genenetwork2-420fd69ceda63871e9f6755112769c5615ed45f6.tar.gz |
Merge branch 'master' into chfi
Diffstat (limited to 'test/lib/link_checker.rb')
-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}" |