summaryrefslogtreecommitdiff
path: root/spec/support/shared/with_expected.rb
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-09-16 17:19:55 -0600
committermo khan <mo.khan@gmail.com>2020-09-16 17:19:55 -0600
commit20595e44b91a72dc39f72090bf9aed3b7db2a1bc (patch)
tree834a87f83ec44e44f090e264887a8d0413abac1e /spec/support/shared/with_expected.rb
parent46b002a96345ce18b0f7a95ef00fca1c34cb9298 (diff)
test: add spec to validate the dependency_scanning report schema
Diffstat (limited to 'spec/support/shared/with_expected.rb')
-rw-r--r--spec/support/shared/with_expected.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/support/shared/with_expected.rb b/spec/support/shared/with_expected.rb
index be4d7cc..00fc420 100644
--- a/spec/support/shared/with_expected.rb
+++ b/spec/support/shared/with_expected.rb
@@ -6,11 +6,13 @@ RSpec.shared_examples "with expected" do |language, package_manager, version, br
let(:git_branch) { branch }
let(:expected_content) { JSON.parse(fixture_file_content("expected/#{language}/#{package_manager}/#{branch}/v#{version}.json")) }
+ pending { expect(subject).to match_schema(report_type) }
+
pending do
- actual_pretty = JSON.pretty_generate(subject.to_h)
- expected_pretty = JSON.pretty_generate(expected_content)
+ actual = JSON.pretty_generate(subject.to_h)
+ expected = JSON.pretty_generate(expected_content)
- expect(actual_pretty).to eq(expected_pretty)
+ expect(actual).to eq(expected)
end
end
end