mirror of
https://github.com/github/choosealicense.com
synced 2024-12-22 12:50:24 +01:00
formalize whitelist
This commit is contained in:
parent
2029405007
commit
8c63910daa
@ -1,5 +1,13 @@
|
|||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
|
# List of licenses that need not be OSI approved
|
||||||
|
LICENSE_WHITELIST = %w[
|
||||||
|
unlicense
|
||||||
|
cc0-1.0
|
||||||
|
wtfpl
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
licenses.each do |license|
|
licenses.each do |license|
|
||||||
describe "The #{license["title"]} license" do
|
describe "The #{license["title"]} license" do
|
||||||
it "should have a title" do
|
it "should have a title" do
|
||||||
@ -23,10 +31,11 @@ licenses.each do |license|
|
|||||||
end
|
end
|
||||||
|
|
||||||
# CC0 and Unlicense are not OSI approved, but that's okay
|
# CC0 and Unlicense are not OSI approved, but that's okay
|
||||||
unless license["id"] == "unlicense" || license["id"] == "cc0-1.0"
|
unless LICENSE_WHITELIST.include? license["id"]
|
||||||
it "should be OSI approved" do
|
it "should be OSI approved" do
|
||||||
spdx = find_spdx(license["id"])
|
spdx = find_spdx(license["id"])
|
||||||
expect(spdx[1]["osiApproved"]).to eql(true)
|
approved = spdx[1]["osiApproved"]
|
||||||
|
expect(approved).to eql(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user