Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/url_sanitizer_spec.rb')
-rw-r--r--spec/lib/gitlab/url_sanitizer_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/gitlab/url_sanitizer_spec.rb b/spec/lib/gitlab/url_sanitizer_spec.rb
index 758a9bc5a2b..b41a81a8167 100644
--- a/spec/lib/gitlab/url_sanitizer_spec.rb
+++ b/spec/lib/gitlab/url_sanitizer_spec.rb
@@ -145,6 +145,10 @@ describe Gitlab::UrlSanitizer do
'http://foo:@example.com' | 'http://foo@example.com'
'http://:bar@example.com' | :same
'http://foo:bar@example.com' | :same
+ 'http://foo:g p@example.com' | 'http://foo:g%20p@example.com'
+ 'http://foo:s/h@example.com' | 'http://foo:s%2Fh@example.com'
+ 'http://t u:a#b@example.com' | 'http://t%20u:a%23b@example.com'
+ 'http://t+u:a#b@example.com' | 'http://t%2Bu:a%23b@example.com'
end
with_them do
@@ -160,7 +164,7 @@ describe Gitlab::UrlSanitizer do
url_sanitizer = described_class.new("https://foo:b?r@github.com/me/project.git")
expect(url_sanitizer.sanitized_url).to eq("https://github.com/me/project.git")
- expect(url_sanitizer.full_url).to eq("https://foo:b?r@github.com/me/project.git")
+ expect(url_sanitizer.full_url).to eq("https://foo:b%3Fr@github.com/me/project.git")
end
end
end