handle special characters in names

This commit is contained in:
2016-05-05 22:32:03 +02:00
parent bb9abe2cdf
commit ee242ca92a
3 changed files with 24 additions and 6 deletions

View File

@ -38,11 +38,19 @@ defmodule MailexTest do
}
end
defp email_with_special_chars_in_names do
%Mailex.Email{
from: %Mailex.Address{ name: ", Test", address: "test_a@gmail.com" },
to: [%Mailex.Address{ name: ":,<>[]()'\"Whatever", address: "test_b@gmail.com" }]
}
end
test "Messages render" do
assert email_minimal |> Mailex.Render.render
assert email_with_reply_to |> Mailex.Render.render
assert email_without_attachments |> Mailex.Render.render
assert email_with_attachments |> Mailex.Render.render
assert email_with_special_chars_in_names |> Mailex.Render.render
end
end