diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/license/management/report/v2_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/license/management/report/v2_spec.rb b/spec/license/management/report/v2_spec.rb index 766c08d..85c6158 100644 --- a/spec/license/management/report/v2_spec.rb +++ b/spec/license/management/report/v2_spec.rb @@ -39,5 +39,13 @@ RSpec.describe License::Management::Report::V2 do specify { expect(result[:licenses][0]['id']).to eq(spdx_id) } end end + + context "when choosing an appropriate url for a license" do + subject { described_class.new([dependency]) } + let(:license) { LicenseFinder::License.new(short_name: 'MIT', matcher: LicenseFinder::License::NoneMatcher.new, url: nil) } + let(:dependency) { double(name: 'x', summary: '', description: '', homepage: '', licenses: [license]) } + + specify { expect(subject.to_h[:licenses][0]['url']).to eql('https://opensource.org/licenses/MIT') } + end end end |
