mail/util/normalize.spec.lua
BuckarooBanzay e8c7fde4c3
tests
2023-03-29 14:49:09 +02:00

12 lines
No EOL
397 B
Lua

mtt.register("util/normalize_players_and_add_recipients", function(callback)
local recipients = {}
local undeliverable = {}
local to = mail.normalize_players_and_add_recipients("player1,player2", recipients, undeliverable)
assert(to == "player1, player2")
assert(not next(undeliverable))
assert(recipients["player1"])
assert(recipients["player2"])
callback()
end)