summaryrefslogtreecommitdiff
path: root/spec/integration/dotnet/nuget_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/dotnet/nuget_spec.rb')
-rw-r--r--spec/integration/dotnet/nuget_spec.rb11
1 files changed, 4 insertions, 7 deletions
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',