summaryrefslogtreecommitdiff
path: root/spec/integration/ruby
diff options
context:
space:
mode:
authorCan Eldem <celdem@gitlab.com>2020-07-02 09:12:22 +0000
committerCan Eldem <celdem@gitlab.com>2020-07-02 09:12:22 +0000
commit11c7187a0b9c290437d90af2d53b4d06ae8f4232 (patch)
treee4a85d6f6030ea15637e1de9d7b853404c695c84 /spec/integration/ruby
parent2b8b49ae9fcd960beb0c639f241ce20690e7c7b0 (diff)
parenta46f75c1caef17519a425d1dcd3ac7687ea6622e (diff)
Merge branch 'aeroscan-nl/license-management-upgrade_license_finder' into 'master'v3.13.0
Upgrade LicenseFinder to 6.6.0 See merge request gitlab-org/security-products/license-management!166
Diffstat (limited to 'spec/integration/ruby')
-rw-r--r--spec/integration/ruby/bundler_spec.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/integration/ruby/bundler_spec.rb b/spec/integration/ruby/bundler_spec.rb
index f0464fe..428b357 100644
--- a/spec/integration/ruby/bundler_spec.rb
+++ b/spec/integration/ruby/bundler_spec.rb
@@ -139,4 +139,36 @@ BUNDLED WITH
expect(report).to match_schema
end
end
+
+ context "when parsing a project with versions of gems that conflict with license_finder" do
+ subject { runner.scan }
+
+ before do
+ runner.mount(dir: fixture_file('ruby/bundler-gem-conflict'))
+ end
+
+ specify do
+ expect(subject).to match_schema
+ expect(subject[:licenses]).not_to be_empty
+ expect(subject[:dependencies]).not_to be_empty
+ expect(subject.dependency_names).to include('rails')
+ end
+ end
+
+ context "when scanning the `gitlab` project" do
+ subject { runner.scan }
+
+ before do
+ runner.clone('https://gitlab.com/gitlab-org/gitlab.git')
+ system("rm #{runner.project_path}/config/dependency_decisions.yml")
+ end
+
+ specify do
+ expect(subject).to match_schema
+ expect(subject[:licenses]).not_to be_empty
+ expect(subject[:dependencies]).not_to be_empty
+ expect(subject.dependency_names).to include('rails')
+ expect(subject.dependency_names).to include('vue')
+ end
+ end
end