Skip to content

A platform for community discussion. Free, open, simple.

add test case for csv BOM handling

Arpit Jalan6c1ebbb95c18
diff --git a/spec/fixtures/csv/discourse.csv b/spec/fixtures/csv/discourse.csv
index 3a71578994f..b12e45a3cd9 100644
--- a/spec/fixtures/csv/discourse.csv
+++ b/spec/fixtures/csv/discourse.csv
@@ -1 +1,5 @@
[email protected],discourse;ubuntu,100 [email protected],ubuntu, [email protected],discourse,200 [email protected],random, [email protected],,8888
\ No newline at end of file
+[email protected],discourse;ubuntu,100
[email protected],discourse,200
diff --git a/spec/jobs/bulk_invite_spec.rb b/spec/jobs/bulk_invite_spec.rb
index 0739a415743..3cc66f26eac 100644
--- a/spec/jobs/bulk_invite_spec.rb
+++ b/spec/jobs/bulk_invite_spec.rb
@@ -18,6 +18,7 @@ describe Jobs::BulkInvite do
bulk_invite.current_user = user
bulk_invite.read_csv_file(csv_file)
expect(Invite.where(email: "[email protected]").exists?).to eq(true)
+ expect(Invite.where(email: "[email protected]").exists?).to eq(true) # handles BOM
end
end