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,7 +148,7 @@ RSpec.describe Security::DependencyListService do ...@@ -148,7 +148,7 @@ RSpec.describe Security::DependencyListService do
} }
end end
expect(dependencies).to eq([{ name: "saml2-js", vulnerabilities: %w(unknown medium critical) }, expect(dependencies).to match([{ name: "saml2-js", vulnerabilities: match_array(%w(unknown medium critical)) },
{ name: "nokogiri", vulnerabilities: ["high"] }]) { name: "nokogiri", vulnerabilities: ["high"] }])
end end
...@@ -156,7 +156,7 @@ RSpec.describe Security::DependencyListService do ...@@ -156,7 +156,7 @@ RSpec.describe Security::DependencyListService do
saml2js_dependency = subject.find { |dep| dep[:name] == 'saml2-js' } saml2js_dependency = subject.find { |dep| dep[:name] == 'saml2-js' }
saml2js_severities = saml2js_dependency[:vulnerabilities].map {|v| v[:severity] } 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 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