summaryrefslogtreecommitdiff
path: root/spec/integration/python/pipenv_spec.rb
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/python/pipenv_spec.rb
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/python/pipenv_spec.rb')
-rw-r--r--spec/integration/python/pipenv_spec.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/spec/integration/python/pipenv_spec.rb b/spec/integration/python/pipenv_spec.rb
index 983ea8b..410d3c7 100644
--- a/spec/integration/python/pipenv_spec.rb
+++ b/spec/integration/python/pipenv_spec.rb
@@ -24,11 +24,10 @@ RSpec.describe "pipenv" do
report = runner.scan
- expect(report).not_to be_empty
expect(report).to match_schema(version: '2.0')
expect(report[:version]).not_to be_empty
expect(report[:licenses]).not_to be_empty
- expect(report[:dependencies].map { |x| x[:name] }).to contain_exactly("six")
+ expect(report.dependency_names).to contain_exactly("six")
end
end
@@ -71,10 +70,9 @@ RSpec.describe "pipenv" do
report = runner.scan
expect(report).to match_schema(version: '2.0')
- expect(report).not_to be_empty
expect(report[:version]).not_to be_empty
expect(report[:licenses]).not_to be_empty
- expect(report[:dependencies].map { |x| x[:name] }).to match_array([
+ expect(report.dependency_names).to match_array([
"backports.shutil_get_terminal_size",
"click",
"colorama",
@@ -132,10 +130,9 @@ RSpec.describe "pipenv" do
report = runner.scan
expect(report).to match_schema(version: '2.0')
- expect(report).not_to be_empty
expect(report[:version]).not_to be_empty
expect(report[:licenses]).not_to be_empty
- expect(report[:dependencies].map { |x| x[:name] }).to match_array(%w[
+ expect(report.dependency_names).to match_array(%w[
certifi
chardet
idna
@@ -171,7 +168,7 @@ RSpec.describe "pipenv" do
expect(report).to match_schema(version: '2.0')
expect(report[:licenses]).not_to be_empty
expect(report[:dependencies].count).to be(1)
- expect(find_in(report, 'six')).not_to be_nil
+ expect(report.find('six')).not_to be_nil
end
end
@@ -192,13 +189,13 @@ RSpec.describe "pipenv" do
it 'includes dependencies in the default group' do
lockfile_hash['default'].keys.each do |key|
- expect(find_in(report, key)).not_to be_nil
+ expect(report.find(key)).not_to be_nil
end
end
it 'excludes dependencies in the development group' do
lockfile_hash['develop'].keys.each do |key|
- expect(find_in(report, key)).to be_nil
+ expect(report.find(key)).to be_nil
end
end
end