debian-mirror-gitlab/spec/lib/gitlab/patch/uri_spec.rb
2022-11-25 23:54:43 +05:30

15 lines
443 B
Ruby

# 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