diff options
| author | mo khan <mo.khan@gmail.com> | 2019-10-21 15:15:15 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2019-10-21 15:15:15 -0600 |
| commit | 83ec89cff1681d65a239b94f313ca102e5b2843c (patch) | |
| tree | 1077d76e904836fbdd0eed9d9e76d6ab4832050c /spec | |
| parent | a6adceebeb1ca109439636f90459263ddc828682 (diff) | |
Use the latest seeAlso url
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 |
