Welcome to mirror list, hosted at ThFree Co, Russian Federation.

uri_spec.rb « patch « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8232bb71fa4bcc4b38f7a907de13f41eaffa3d7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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