mirror of
https://github.com/github/choosealicense.com
synced 2024-11-05 19:28:50 +01:00
570f69e4ec
- document criteria for whether a license is hidden - needed for license spectrum on /licenses OR - on 'popular' list at https://opensource.org/licenses (some other list could be used in the future) - adjust license properties and tests accordingly This gets non-hidden list back close to what it was before #386 and (pending licensee vendoring this change, licensee release, and github.com licensee dependency version bump) some commonly requested licenses (eg #413 #449) will reappear in the github.com license drop-down.
33 lines
699 B
Ruby
33 lines
699 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'shown licenses' do
|
|
# Whitelist of popular licenses that are shown (non-hidden)
|
|
# Note: most new licenses that are added should be hidden by default
|
|
SHOWN_LICENSES = %w(
|
|
agpl-3.0
|
|
apache-2.0
|
|
bsd-2-clause
|
|
bsd-3-clause
|
|
epl-1.0
|
|
gpl-2.0
|
|
gpl-3.0
|
|
lgpl-2.1
|
|
lgpl-3.0
|
|
mit
|
|
mpl-2.0
|
|
unlicense
|
|
).freeze
|
|
|
|
it 'has the expected number of shown licenses' do
|
|
expect(shown_licenses.count).to eql(12)
|
|
end
|
|
|
|
shown_licenses.each do |license|
|
|
context "the #{license['title']} license" do
|
|
it 'is whitelisted to be shown' do
|
|
expect(SHOWN_LICENSES).to include(license['spdx-lcase'])
|
|
end
|
|
end
|
|
end
|
|
end
|