2015-03-07 18:47:24 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
licenses.each do |license|
|
2016-01-15 23:40:32 +01:00
|
|
|
|
|
|
|
# "No license" isn't really a license, so no need to test
|
|
|
|
next if license["id"] == "no-license"
|
|
|
|
|
2015-03-07 18:47:24 +01:00
|
|
|
describe "The #{license["title"]} license" do
|
2016-01-15 23:40:32 +01:00
|
|
|
|
2016-01-16 00:01:07 +01:00
|
|
|
let(:id) { license["id"] }
|
2016-01-15 23:40:32 +01:00
|
|
|
|
|
|
|
it "has an SPDX ID" do
|
|
|
|
expect(spdx_ids).to include(id)
|
|
|
|
end
|
|
|
|
|
|
|
|
it "uses its SPDX name" do
|
|
|
|
spdx = find_spdx(id)
|
|
|
|
expect(spdx[1]["name"].gsub(/ only$/,"")).to eql(license["title"])
|
|
|
|
end
|
|
|
|
|
2016-01-16 00:01:07 +01:00
|
|
|
context "industry approval" do
|
|
|
|
it "should be approved by OSI or FSF or OD" do
|
|
|
|
expect(approved_licenses).to include(id), "See https://git.io/vzCTV."
|
|
|
|
end
|
2015-03-07 19:38:52 +01:00
|
|
|
end
|
2015-03-07 18:47:24 +01:00
|
|
|
end
|
|
|
|
end
|