1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 21:00:10 +01:00
choosealicense.com/spec/license_shown_spec.rb

36 lines
742 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-03-26 17:19:44 -07:00
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
2017-04-08 22:40:27 -07:00
SHOWN_LICENSES = %w[
agpl-3.0
apache-2.0
bsd-2-clause
bsd-3-clause
2019-11-20 08:11:57 -08:00
cc0-1.0
2017-11-24 14:15:52 -08:00
epl-2.0
gpl-2.0
gpl-3.0
lgpl-2.1
lgpl-3.0
mit
mpl-2.0
unlicense
2017-04-08 22:40:27 -07:00
].freeze
it 'has the expected number of shown licenses' do
2019-11-20 08:11:57 -08:00
expect(shown_licenses.count).to eql(13)
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