mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-13 09:51:58 -04:00
tests
This commit is contained in:
parent
dff068d75b
commit
e8c7fde4c3
8 changed files with 95 additions and 20 deletions
12
util/normalize.spec.lua
Normal file
12
util/normalize.spec.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
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)
|
Loading…
Add table
Add a link
Reference in a new issue