diff options
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/integration_test_helper.rb | 2 | ||||
| -rw-r--r-- | spec/support/matchers.rb | 2 | ||||
| -rw-r--r-- | spec/support/shared.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/integration_test_helper.rb b/spec/support/integration_test_helper.rb index ead30d4..aa3f0c0 100644 --- a/spec/support/integration_test_helper.rb +++ b/spec/support/integration_test_helper.rb @@ -15,7 +15,7 @@ module IntegrationTestHelper end def licenses_for(name) - find(name)[:licenses] + (find(name) || {}).fetch(:licenses, []) end def find(name) diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index 66bb92c..9f88bf1 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -1,4 +1,4 @@ -RSpec::Matchers.define :match_schema do |version: '2.0'| +RSpec::Matchers.define :match_schema do |version: License::Management::Report::DEFAULT_VERSION| def schema_for(version) License::Management.root.join("spec/fixtures/schema/v#{version}.json").to_s end diff --git a/spec/support/shared.rb b/spec/support/shared.rb index 51b161a..49edd45 100644 --- a/spec/support/shared.rb +++ b/spec/support/shared.rb @@ -1,5 +1,5 @@ RSpec.shared_examples "each report version" do |language, package_manager, branch = 'master'| - ['1.0', '1.1', '2.0'].each do |version| + ['1.0', '1.1', '2.0', '2.1'].each do |version| context "when generating a `#{version}` report for #{package_manager}" do let(:url) { "https://gitlab.com/gitlab-org/security-products/tests/#{language}-#{package_manager}.git" } let(:expected_content) { JSON.parse(fixture_file_content("expected/#{language}/#{package_manager}/v#{version}.json")) } |
