summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2019-10-29 10:19:35 -0600
committermo khan <mo.khan@gmail.com>2019-10-29 10:38:16 -0600
commite731e3570cce4a73aa2c17009c92587e6b3dd4c6 (patch)
tree0bf39daf31d1b77bea3ffe971a76145b51791d82 /spec
parent13fd9dab34909eaf228534e0fd399b845c5e614a (diff)
Map `Apache License v2.0` to `Apache-2.0`
Diffstat (limited to 'spec')
-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