Skip to content

Draft: Fix false positives in url_blocker_spec.rb

What does this MR do and why?

Gitlab::UrlBlocker has a special ENV['RSPEC_ALLOW_INVALID_URLS'] variable for the test environment to silently consider invalid URLs to be valid. It is set to true for all tests by default.

This can lead to some false positives in spec/lib/gitlab/url_blocker_spec.rb when a test passes because the URI is invalid rather than for the intended reason in the test.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #393139

Edited by Luke Duncalfe

Merge request reports