Skip to content

Commit

Permalink
Attemp to improve 404 finding test
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Jul 5, 2024
1 parent 7e61241 commit b15455f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utilities/spec/accessibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,11 @@ def a11y_test_cases(course, url)
url = link['href']
next unless url

# All google docs seem to report 401's falsely in CI.
next if url.match(/docs\.google\.com/)

response = Net::HTTP.get_response(URI(url))
unless [200, 301, 302].include?(response.code.to_i)
unless [200, 301, 302, 303].include?(response.code.to_i)
passed_test = false
puts "Broken link: #{url} returned a #{response.code}"
end
Expand Down

0 comments on commit b15455f

Please sign in to comment.