Updated tests to pass
This commit is contained in:
parent
52321b4fcd
commit
0d6ea9e26c
@ -94,7 +94,6 @@ module Homebrew
|
|||||||
fa = formula_auditor "foo", <<~RUBY, spdx_data: spdx_data, new_formula: false
|
fa = formula_auditor "foo", <<~RUBY, spdx_data: spdx_data, new_formula: false
|
||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url "https://brew.sh/foo-1.0.tgz"
|
url "https://brew.sh/foo-1.0.tgz"
|
||||||
license ""
|
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
@ -106,7 +105,6 @@ module Homebrew
|
|||||||
fa = formula_auditor "foo", <<~RUBY, spdx_data: spdx_data, new_formula: true
|
fa = formula_auditor "foo", <<~RUBY, spdx_data: spdx_data, new_formula: true
|
||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url "https://brew.sh/foo-1.0.tgz"
|
url "https://brew.sh/foo-1.0.tgz"
|
||||||
license ""
|
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
@ -123,19 +121,19 @@ module Homebrew
|
|||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
fa.audit_license
|
fa.audit_license
|
||||||
expect(fa.problems.first).to match "Formula foo contains non standard SPDX license: [\"zzz\"]."
|
expect(fa.problems.first).to match "Formula foo contains non-standard SPDX licenses: [\"zzz\"]."
|
||||||
end
|
end
|
||||||
|
|
||||||
it "detects if license array contains a non-standard spdx-id" do
|
it "detects if license array contains a non-standard spdx-id" do
|
||||||
fa = formula_auditor "foo", <<~RUBY, spdx_data: spdx_data, new_formula: true
|
fa = formula_auditor "foo", <<~RUBY, spdx_data: spdx_data, new_formula: true
|
||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url "https://brew.sh/foo-1.0.tgz"
|
url "https://brew.sh/foo-1.0.tgz"
|
||||||
license "#{license_array}"
|
license #{license_array_nonstandard}
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
fa.audit_license
|
fa.audit_license
|
||||||
expect(fa.problems.first).to match "Formula foo contains non standard SPDX license: [\"zzz\"]."
|
expect(fa.problems.first).to match "Formula foo contains non-standard SPDX licenses: [\"zzz\"]."
|
||||||
end
|
end
|
||||||
|
|
||||||
it "verifies that a license info is a standard spdx id" do
|
it "verifies that a license info is a standard spdx id" do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user