Commit 58824299 authored by Stan Hu's avatar Stan Hu

Merge branch '333513-fix-spec-order-of-vulnerabilites-when-ff-disabled' into 'master'

Don't compare array orders when FF disabled

See merge request gitlab-org/gitlab!63952
parents 6d4a2362 ec778f49
......@@ -148,15 +148,15 @@ RSpec.describe Security::DependencyListService do
}
end
expect(dependencies).to eq([{ name: "saml2-js", vulnerabilities: %w(unknown medium critical) },
{ name: "nokogiri", vulnerabilities: ["high"] }])
expect(dependencies).to match([{ name: "saml2-js", vulnerabilities: match_array(%w(unknown medium critical)) },
{ name: "nokogiri", vulnerabilities: ["high"] }])
end
it 'returns array of data with package vulnerabilities sorted in ascending order' do
saml2js_dependency = subject.find { |dep| dep[:name] == 'saml2-js' }
saml2js_severities = saml2js_dependency[:vulnerabilities].map {|v| v[:severity] }
expect(saml2js_severities).to eq(%w(unknown medium critical))
expect(saml2js_severities).to match_array(%w(unknown medium critical))
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