Commit 9321e9dd authored by Sean McGivern's avatar Sean McGivern

Merge branch '233094-fix-flaky-test-in-projects-grade' into 'master'

Fix flaky test in projects grade spec

Closes #233094

See merge request gitlab-org/gitlab!38389
parents 0d013cc9 ac7edc61
......@@ -17,7 +17,7 @@ RSpec.describe Vulnerabilities::ProjectsGrade do
let_it_be(:vulnerability_statistic_5) { create(:vulnerability_statistic, :f, project: project_5) }
describe '.grades_for' do
let(:compare_key) { ->(projects_grade) { [projects_grade.grade, projects_grade.project_ids] } }
let(:compare_key) { ->(projects_grade) { [projects_grade.grade, projects_grade.project_ids.sort] } }
subject(:projects_grades) { described_class.grades_for([vulnerable]) }
......@@ -77,7 +77,7 @@ RSpec.describe Vulnerabilities::ProjectsGrade do
subject(:projects) { projects_grade.projects }
it { is_expected.to eq(expected_projects) }
it { is_expected.to match_array(expected_projects) }
end
describe '#count' do
......
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