summaryrefslogtreecommitdiff
path: root/spec/integration/dotnet
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-04-02 15:11:12 +0000
committermo khan <mo.khan@gmail.com>2020-04-02 15:11:12 +0000
commit2d200e2bcecb91eadc5ee211f5bb65aafa645054 (patch)
tree9749333a7c8878b833b4642afe3071cf1c14012c /spec/integration/dotnet
parent43bcbbd04342faa497725c5b0be3c6d944d850da (diff)
parentbfd7459419921ff37ee500f0698862eea6788675 (diff)
Merge branch '10128-go-modules' into 'master'v3.5.0
Improve license detection in go modules projects See merge request gitlab-org/security-products/license-management!129
Diffstat (limited to 'spec/integration/dotnet')
-rw-r--r--spec/integration/dotnet/examples_spec.rb1
-rw-r--r--spec/integration/dotnet/nuget_spec.rb11
2 files changed, 4 insertions, 8 deletions
diff --git a/spec/integration/dotnet/examples_spec.rb b/spec/integration/dotnet/examples_spec.rb
index 87459ee..13f4712 100644
--- a/spec/integration/dotnet/examples_spec.rb
+++ b/spec/integration/dotnet/examples_spec.rb
@@ -5,7 +5,6 @@ RSpec.describe ".NET Core" do
runner.clone('https://github.com/microsoft/RockPaperScissorsLizardSpock.git')
report = runner.scan(env: { 'LICENSE_FINDER_CLI_OPTS' => '--recursive' })
- expect(report).not_to be_empty
expect(report).to match_schema(version: '2.0')
expect(report[:licenses].count).not_to be_zero
expect(report[:dependencies].count).not_to be_zero
diff --git a/spec/integration/dotnet/nuget_spec.rb b/spec/integration/dotnet/nuget_spec.rb
index 0efbcf0..6eeb261 100644
--- a/spec/integration/dotnet/nuget_spec.rb
+++ b/spec/integration/dotnet/nuget_spec.rb
@@ -26,10 +26,9 @@ RSpec.describe "nuget" do
runner.add_file('packages.config', packages_config)
report = runner.scan
- expect(report).not_to be_empty
expect(report).to match_schema(version: '2.0')
expect(report[:licenses].count).not_to be_zero
- expect(report[:dependencies].map { |x| x[:name] }).to match_array([
+ expect(report.dependency_names).to match_array([
"Microsoft.CodeDom.Providers.DotNetCompilerPlatform",
"Microsoft.Net.Compilers",
"Microsoft.Web.Infrastructure",
@@ -68,10 +67,9 @@ RSpec.describe "nuget" do
runner.add_file('winforms/packages.config', winforms_packages)
report = runner.scan(env: { 'LICENSE_FINDER_CLI_OPTS' => '--recursive' })
- expect(report).not_to be_empty
expect(report).to match_schema(version: '2.0')
- expect(find_in(report, 'jive')[:licenses]).to match_array(['MIT'])
- expect(find_in(report, 'MvcMailer')[:licenses]).to match_array(['MIT'])
+ expect(report.licenses_for('jive')).to match_array(['MIT'])
+ expect(report.licenses_for('MvcMailer')).to match_array(['MIT'])
end
end
@@ -89,11 +87,10 @@ RSpec.describe "nuget" do
runner.add_file('packages.config', packages)
report = runner.scan
- expect(report).not_to be_empty
expect(report).to match_schema(version: '2.0')
expect(report[:licenses].count).not_to be_zero
expect(report[:licenses].map { |x| x[:id] }.uniq).to match_array(['LGPL-2.1', 'Apache-2.0', 'BSD-3-Clause'])
- expect(report[:dependencies].map { |x| x[:name] }).to match_array([
+ expect(report.dependency_names).to match_array([
'Iesi.Collections',
'Remotion.Linq',
'Remotion.Linq.EagerFetching',