summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-09-13 17:10:47 +0000
committerRémy Coutable <remy@rymai.me>2017-09-13 17:10:47 +0000
commitf06d370b20ffbb7b8dba83b841df053b39cf3b1a (patch)
tree5cc8ac653b6766ca7e9adbb36f133b416c0a2b78 /spec
parent3527312189fae49d75828ce2eb8db843d8bcbad4 (diff)
parentb46d5b13ecb8e0c0793fa433bff7f49cb0612760 (diff)
downloadgitlab-ce-f06d370b20ffbb7b8dba83b841df053b39cf3b1a.tar.gz
Merge branch 'backport-ee-changes-to-url-sanitizer' into 'master'
Backport more EE changes to Gitlab::UrlSanitizer See merge request !14150
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/url_sanitizer_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/url_sanitizer_spec.rb b/spec/lib/gitlab/url_sanitizer_spec.rb
index fdc3990132a..59c28431e1e 100644
--- a/spec/lib/gitlab/url_sanitizer_spec.rb
+++ b/spec/lib/gitlab/url_sanitizer_spec.rb
@@ -174,4 +174,13 @@ describe Gitlab::UrlSanitizer do
end
end
end
+
+ context 'when credentials contains special chars' do
+ it 'should parse the URL without errors' 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")
+ end
+ end
end