Commit ac7edc61 authored by Alan (Maciej) Paruszewski's avatar Alan (Maciej) Paruszewski Committed by Sean McGivern

Fix flaky test in projects grade spec

parent 6f17d227
......@@ -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