add test case for csv BOM handling

This commit is contained in:
Arpit Jalan 2018-01-09 15:49:41 +05:30
parent c9921869f1
commit 6c1ebbb95c
2 changed files with 6 additions and 1 deletions

View File

@ -1 +1,5 @@
jeff@gmail.com,discourse;ubuntu,100 sam@yahoo.com,ubuntu, robin@outlook.com,discourse,200 neil@aol.com,random, regis@live.com,,8888
jeff@gmail.com,discourse;ubuntu,100
sam@yahoo.com,ubuntu,
robin@outlook.com,discourse,200
neil@aol.com,random,
regis@live.com,,8888

1 jeff@gmail.com discourse;ubuntu 100 sam@yahoo.com 100 ubuntu robin@outlook.com discourse 200 neil@aol.com random regis@live.com 8888
2 sam@yahoo.com ubuntu
3 robin@outlook.com discourse 200
4 neil@aol.com random
5 regis@live.com 8888

View File

@ -18,6 +18,7 @@ describe Jobs::BulkInvite do
bulk_invite.current_user = user
bulk_invite.read_csv_file(csv_file)
expect(Invite.where(email: "robin@outlook.com").exists?).to eq(true)
expect(Invite.where(email: "jeff@gmail.com").exists?).to eq(true) # handles BOM
end
end