summaryrefslogtreecommitdiff
path: root/spec/license/management
diff options
context:
space:
mode:
Diffstat (limited to 'spec/license/management')
-rw-r--r--spec/license/management/repository_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/license/management/repository_spec.rb b/spec/license/management/repository_spec.rb
index dbc0a22..6ebc09e 100644
--- a/spec/license/management/repository_spec.rb
+++ b/spec/license/management/repository_spec.rb
@@ -23,5 +23,16 @@ RSpec.describe License::Management::Repository do
end
end
end
+
+ [
+ ['Apache License v2.0', 'Apache-2.0'],
+ ].each do |short_name, spdx_id|
+ context "when mapping a `#{short_name}` license" do
+ let(:license) { LicenseFinder::License.new(short_name: short_name, matcher: LicenseFinder::License::NoneMatcher.new, url: nil) }
+ let(:dependency) { double(name: 'x', summary: '', description: '', homepage: '', licenses: [license]) }
+
+ it { expect(subject.item_for(license)['id']).to eql(spdx_id) }
+ end
+ end
end
end