debian-mirror-gitlab/spec/lib/sbom/package_url/encoder_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
660 B
Ruby
Raw Normal View History

2023-01-13 00:05:48 +05:30
# frozen_string_literal: true
require 'fast_spec_helper'
require 'rspec-parameterized'
require_relative '../../../support/shared_contexts/lib/sbom/package_url_shared_contexts'
RSpec.describe Sbom::PackageUrl::Encoder do
describe '#encode' do
let(:package) do
::Sbom::PackageUrl.new(
type: type,
namespace: namespace,
name: name,
version: version,
qualifiers: qualifiers,
subpath: subpath
)
end
subject(:encode) { described_class.new(package).encode }
include_context 'with valid purl examples'
with_them do
it { is_expected.to eq(canonical_purl) }
end
end
end