From 2aac657da7906804e4799bb2e1e35f982391dc87 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Tue, 16 Feb 2021 16:35:47 +0530 Subject: [PATCH] DEV: fix flaky specs in ExportUserArchive (#12095) --- spec/jobs/export_user_archive_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/jobs/export_user_archive_spec.rb b/spec/jobs/export_user_archive_spec.rb index 996c0c2c6de..236fc275492 100644 --- a/spec/jobs/export_user_archive_spec.rb +++ b/spec/jobs/export_user_archive_spec.rb @@ -368,6 +368,7 @@ describe Jobs::ExportUserArchive do data, csv_out = make_component_csv expect(data.length).to eq(4) + data.sort_by! { |row| row['post_id'].to_i } expect(data[0]['post_id']).to eq(other_post.id.to_s) expect(data[0]['flag_type']).to eq('notify_moderators') @@ -398,6 +399,7 @@ describe Jobs::ExportUserArchive do data, csv_out = make_component_csv expect(data.length).to eq(2) + data.sort_by! { |row| row['post_id'].to_i } expect(data[0]['post_id']).to eq(other_post.id.to_s) expect(data[1]['post_id']).to eq(post3.id.to_s)