diff options
Diffstat (limited to 'spec/integration')
| -rw-r--r-- | spec/integration/js/bower_spec.rb | 2 | ||||
| -rw-r--r-- | spec/integration/ruby/bundler_spec.rb | 32 |
2 files changed, 33 insertions, 1 deletions
diff --git a/spec/integration/js/bower_spec.rb b/spec/integration/js/bower_spec.rb index cc7cf9d..6d51394 100644 --- a/spec/integration/js/bower_spec.rb +++ b/spec/integration/js/bower_spec.rb @@ -12,7 +12,7 @@ RSpec.describe "bower" do specify { expect(subject).to match_schema } specify { expect(subject.dependency_names).to match_array(['cli', 'ev-emitter', 'example-project', 'fizzy-ui-utils', 'get-size', 'jquery', 'masonry-layout', 'matches-selector', 'outlayer', 'stimulus.umd']) } - specify { expect(subject.licenses_for('cli')).to match_array(['Apache-2.0', 'BSD-3-Clause', 'ISC', 'MIT']) } + specify { expect(subject.licenses_for('cli')).to match_array(['Apache-2.0', 'BSD-2-Clause', 'BSD-3-Clause', 'ISC', 'MIT']) } specify { expect(subject.licenses_for('ev-emitter')).to match_array(['MIT']) } specify { expect(subject.licenses_for('example-project')).to match_array(['ISC']) } specify { expect(subject.licenses_for('fizzy-ui-utils')).to match_array(['MIT']) } 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 |
