This commit is contained in:
BuckarooBanzay 2023-03-28 15:47:53 +02:00 committed by Athozus
parent dff068d75b
commit e8c7fde4c3
No known key found for this signature in database
GPG key ID: B50895022E8484BF
8 changed files with 95 additions and 20 deletions

12
api.spec.lua Normal file
View file

@ -0,0 +1,12 @@
mtt.register("send mail", function(callback)
-- send a mail
local success, err = mail.send({from = "player1", to = "player2", subject = "something", body = "blah"})
assert(success)
assert(not err)
-- check the receivers inbox
local entry = mail.get_storage_entry("player2")
assert(entry)
assert(#entry.inbox > 0)
callback()
end)