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)