Commit 6ecfb5db authored by Michał Zając's avatar Michał Zając

Improve specs

parent 7333a86f
...@@ -8,12 +8,12 @@ RSpec.describe Gitlab::Ci::Parsers::Security::Validators::SchemaValidator do ...@@ -8,12 +8,12 @@ RSpec.describe Gitlab::Ci::Parsers::Security::Validators::SchemaValidator do
described_class::SUPPORTED_VERSIONS.each_key do |report_type| described_class::SUPPORTED_VERSIONS.each_key do |report_type|
context "#{report_type}" do context "#{report_type}" do
let(:filename) { "#{report_type.to_s.tr("_", "-")}-report-format.json" }
described_class::SUPPORTED_VERSIONS[report_type].each do |version| described_class::SUPPORTED_VERSIONS[report_type].each do |version|
context "#{version}" do context "#{version}" do
it "has a corresponding schema file present" do it "has a corresponding schema file present" do
type_name = report_type.to_s.tr("_", "-") full_path = schema_path.join(version, filename)
file_name = "#{type_name}-report-format.json"
full_path = schema_path.join(version, file_name)
expect(File.file?(full_path)).to be true expect(File.file?(full_path)).to be true
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment