mirror of
https://github.com/mt-mods/mail.git
synced 2025-04-30 08:21:44 -04:00
Fixup typos in complemented test
This commit is contained in:
parent
c692b6ee79
commit
9c2be9d689
1 changed files with 10 additions and 12 deletions
22
api.spec.lua
22
api.spec.lua
|
@ -1,17 +1,15 @@
|
|||
mtt.register("register non-player-recipients", function(callback)
|
||||
mail.register_recipient_handler(function(sender, name)
|
||||
if name:sub(1, 6) == "alias/" then
|
||||
return true, name:sub(7)
|
||||
elseif name == "list/test" then
|
||||
return true, {"alias/player1", "alias/player2"}
|
||||
elseif name == "list/reject" then
|
||||
return false, "It works (?)"
|
||||
end
|
||||
end)
|
||||
end
|
||||
mail.register_recipient_handler(function(_, name)
|
||||
if name:sub(1, 6) == "alias/" then
|
||||
return true, name:sub(7)
|
||||
elseif name == "list/test" then
|
||||
return true, {"alias/player1", "alias/player2"}
|
||||
elseif name == "list/reject" then
|
||||
return false, "It works (?)"
|
||||
end
|
||||
end)
|
||||
|
||||
local function assert_inbox_count(player_name, count)
|
||||
local entry == mail.get_storage_entry(player_name)
|
||||
local entry = mail.get_storage_entry(player_name)
|
||||
assert(entry, player_name .. " has no mail entry")
|
||||
local actual_count = #entry.inbox
|
||||
assert(actual_count == count, ("incorrect mail count: %d expected, got %d"):format(count, actual_count))
|
||||
|
|
Loading…
Add table
Reference in a new issue