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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-21 06:12:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-21 06:12:55 +0300
commitb82d69110784e196facfbe3f8dfc8111393a5dac (patch)
treed0da7ee51cef64aa1256b16b19583d1f2b7624c5 /spec/models/project_spec.rb
parent551734207fa6241cf444b1154294e9b82831ae9a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 10220448936..3f5f0858178 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -424,8 +424,9 @@ RSpec.describe Project, factory_default: :keep do
end
include_context 'invalid urls'
+ include_context 'valid urls with CRLF'
- it 'does not allow urls with CR or LF characters' do
+ it 'does not allow URLs with unencoded CR or LF characters' do
project = build(:project)
aggregate_failures do
@@ -437,6 +438,19 @@ RSpec.describe Project, factory_default: :keep do
end
end
end
+
+ it 'allow URLs with CR or LF characters' do
+ project = build(:project)
+
+ aggregate_failures do
+ valid_urls_with_CRLF.each do |url|
+ project.import_url = url
+
+ expect(project).to be_valid
+ expect(project.errors).to be_empty
+ end
+ end
+ end
end
describe 'project pending deletion' do