Sha256: 16fedba8f0ef1883dd8675f78c7dbdf0ef6a9aa12c1053c12a33fcec37fe8553

Contents?: true

Size: 939 Bytes

Versions: 3

Compression:

Stored size: 939 Bytes

Contents

require_relative '../../support/feature_helper'

describe 'Blacklisted licenses' do
  # As a lawyer
  # I want to blacklist certain licenses
  # So that any dependencies with only these licenses cannot be approved

  let(:developer) { LicenseFinder::TestingDSL::User.new }
  let(:lawyer) { LicenseFinder::TestingDSL::User.new }

  before do
    developer.create_empty_project
    lawyer.execute_command 'license_finder blacklist add BSD'
    developer.execute_command 'license_finder dependencies add blacklisted_dep BSD'
  end

  specify 'prevent packages from being approved' do
    developer.execute_command 'license_finder approval add blacklisted_dep'

    lawyer.run_license_finder
    expect(lawyer).to be_seeing 'blacklisted_dep'
  end

  specify 'override the whitelist' do
    developer.execute_command 'license_finder whitelist add BSD'

    lawyer.run_license_finder
    expect(lawyer).to be_seeing 'blacklisted_dep'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
license_finder-4.0.2 features/features/configure/blacklist_licenses_spec.rb
license_finder-4.0.1 features/features/configure/blacklist_licenses_spec.rb
license_finder-3.1.1 features/features/configure/blacklist_licenses_spec.rb