DEV: fix flaky specs in ExportUserArchive (#12095)

This commit is contained in:
Arpit Jalan 2021-02-16 16:35:47 +05:30 committed by GitHub
parent 277eae97e1
commit 2aac657da7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -368,6 +368,7 @@ describe Jobs::ExportUserArchive do
data, csv_out = make_component_csv data, csv_out = make_component_csv
expect(data.length).to eq(4) 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]['post_id']).to eq(other_post.id.to_s)
expect(data[0]['flag_type']).to eq('notify_moderators') expect(data[0]['flag_type']).to eq('notify_moderators')
@ -398,6 +399,7 @@ describe Jobs::ExportUserArchive do
data, csv_out = make_component_csv data, csv_out = make_component_csv
expect(data.length).to eq(2) 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[0]['post_id']).to eq(other_post.id.to_s)
expect(data[1]['post_id']).to eq(post3.id.to_s) expect(data[1]['post_id']).to eq(post3.id.to_s)