1
0
mirror of https://github.com/github/choosealicense.com synced 2024-06-29 07:03:02 +02:00
choosealicense.com/spec/license_shown_spec.rb

37 lines
756 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-03-27 02:19:44 +02:00
require 'spec_helper'
2020-10-03 20:35:53 +02:00
# Popular licenses that are shown (non-hidden)
2020-10-03 11:01:45 +02:00
# 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
bsl-1.0
cc0-1.0
epl-2.0
gpl-2.0
gpl-3.0
lgpl-2.1
mit
mpl-2.0
unlicense
].freeze
2020-10-03 11:01:45 +02:00
describe 'shown licenses' do
it 'has the expected number of shown licenses' do
expect(shown_licenses.count).to eql(13)
expect(SHOWN_LICENSES.count).to eql(shown_licenses.count)
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