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>2022-11-01 14:56:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-01 14:56:00 +0300
commitf12386aa9acf19877161bfc77e55572f40509cc4 (patch)
treec54e5216f4a7a71fb446e7c3708cb6941a291ce2 /spec/lib/gitlab
parentb64b61bfe72c54fe4a7fdce34b2f1591e3822e5e (diff)
Add latest changes from gitlab-org/security/gitlab@15-5-stable-ee
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/patch/uri_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/gitlab/patch/uri_spec.rb b/spec/lib/gitlab/patch/uri_spec.rb
new file mode 100644
index 00000000000..8232bb71fa4
--- /dev/null
+++ b/spec/lib/gitlab/patch/uri_spec.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::Patch::Uri do
+ describe '#parse' do
+ it 'raises an error if the URI is too long' do
+ expect { URI.parse("https://example.com/#{'a' * 25_000}") }.to raise_error(URI::InvalidURIError)
+ end
+
+ it 'does not raise an error if the URI is not too long' do
+ expect { URI.parse("https://example.com/#{'a' * 14_000}") }.not_to raise_error
+ end
+ end
+end