1
0
mirror of https://github.com/github/choosealicense.com synced 2024-11-06 03:38:49 +01:00
choosealicense.com/spec/license_shown_spec.rb
Mike Linksvayer cf79b35e06 re-add optional hidden field, default to true
licenses on /licenses have `hidden: false` set

fixes #434
2016-06-14 10:35:44 -07:00

28 lines
627 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
gpl-3.0
lgpl-3.0
mit
mpl-2.0
unlicense
).freeze
it 'has the expected number of shown licenses' do
expect(shown_licenses.count).to eql(7)
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