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
path: root/qa/spec
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2019-05-06 06:07:31 +0300
committerMark Lapierre <mlapierre@gitlab.com>2019-05-06 06:07:31 +0300
commitf9e06897adfa550f675fdaa0166ec25f2add28f5 (patch)
tree676e2cbcbe77111942e96030a5ca78739f7599f8 /qa/spec
parent9aa81c0a95b0e54bbafca4755e95f27ee1eeb759 (diff)
Escape arg used in regex
Diffstat (limited to 'qa/spec')
-rw-r--r--qa/spec/git/repository_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/qa/spec/git/repository_spec.rb b/qa/spec/git/repository_spec.rb
index 776dce31d4f..fd77681797f 100644
--- a/qa/spec/git/repository_spec.rb
+++ b/qa/spec/git/repository_spec.rb
@@ -116,6 +116,15 @@ describe QA::Git::Repository do
expect(File.read(File.join(tmp_netrc_dir, '.netrc')))
.to eq("machine foo login user password foo\n")
end
+
+ it 'adds credentials with special characters' do
+ password = %q(!"#$%&'()*+,-./:;<=>?)
+ repository.username = 'user'
+ repository.password = password
+
+ expect(File.read(File.join(tmp_netrc_dir, '.netrc')))
+ .to eq("machine foo login user password #{password}\n")
+ end
end
end
end