summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTetiana Chupryna <tchupryna@gitlab.com>2020-08-13 18:43:27 +0300
committerTetiana Chupryna <tchupryna@gitlab.com>2020-08-21 13:09:13 +0300
commit533e4496f4f79634179291a18fd99765ace506f2 (patch)
tree27e8203bdd0094e54b69daa873aee497bd09e520 /spec
parente08b5a38a7fcade1851637bd401a6097193db00d (diff)
Patch url for not specified BSD license
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/license/management/repository_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/unit/license/management/repository_spec.rb b/spec/unit/license/management/repository_spec.rb
index 04eb469..c54af77 100644
--- a/spec/unit/license/management/repository_spec.rb
+++ b/spec/unit/license/management/repository_spec.rb
@@ -60,5 +60,21 @@ RSpec.describe License::Management::Repository do
it { expect(subject.item_for(license)['id']).to eql(spdx_id) }
end
end
+
+ context 'with BSD license' do
+ subject(:item_license) { described_class.new.item_for(license) }
+
+ let(:license) do
+ LicenseFinder::License.new(
+ short_name: 'BSD',
+ other_names: ['BSD4', 'bsd-old', '4-clause BSD', 'BSD-4-Clause', 'BSD 4-Clause', 'BSD License'],
+ url: 'http://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_.28original_.22BSD_License.22.29'
+ )
+ end
+
+ it 'returns general url' do
+ expect(item_license['url']).to eq('http://en.wikipedia.org/wiki/BSD_licenses')
+ end
+ end
end
end