diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-31 21:08:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-31 21:08:41 +0300 |
commit | 6c3503cc3bd943f6b5681283da2729d04ce4066e (patch) | |
tree | 3449323271d11e7055521e3150c6fac8032daf77 /spec/lib | |
parent | 7f98cf51aa49426815fe943a5a8dae2a96b59c01 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/sbom/package_url/encoder_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/sbom/package_url/encoder_spec.rb b/spec/lib/sbom/package_url/encoder_spec.rb index a0b51007008..195b9969a10 100644 --- a/spec/lib/sbom/package_url/encoder_spec.rb +++ b/spec/lib/sbom/package_url/encoder_spec.rb @@ -25,5 +25,20 @@ RSpec.describe Sbom::PackageUrl::Encoder, feature_category: :dependency_manageme with_them do it { is_expected.to eq(canonical_purl) } end + + context 'when purl requires normalization' do + let(:package) do + ::Sbom::PackageUrl.new( + type: 'github', + namespace: 'GitLab-Org', + name: 'GitLab', + version: '1.0.0' + ) + end + + it 'outputs normalized form' do + expect(encode).to eq('pkg:github/gitlab-org/gitlab@1.0.0') + end + end end end |