aboutsummaryrefslogtreecommitdiff
path: root/spec/afk_spec.lua
diff options
context:
space:
mode:
authorgpcf <gpcf@gpcf.eu>2024-07-28 14:00:52 +0200
committergpcf <gpcf@gpcf.eu>2024-07-28 14:00:52 +0200
commita0aa681c1d75df603dd1d1a3211518fd40a2d986 (patch)
tree9f4835b869c6c4e50281a51377de2b0fd14df59f /spec/afk_spec.lua
parent838f4ff076f75fb2e977591c2eafd49f3a9bfba7 (diff)
downloadxban2-master.tar.gz
xban2-master.tar.bz2
xban2-master.zip
Add unit test for /force_afkHEADmaster
Diffstat (limited to 'spec/afk_spec.lua')
-rw-r--r--spec/afk_spec.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/afk_spec.lua b/spec/afk_spec.lua
index fb63339..c8b0aaa 100644
--- a/spec/afk_spec.lua
+++ b/spec/afk_spec.lua
@@ -59,5 +59,11 @@ describe("Afk works", function()
local newplayer2 = Player("newplayer4")
mineunit:execute_on_joinplayer(admin)
assert.is_false(newplayer2._online)
- end)
+ end)
+ it("Can force moderators to be marked afk", function ()
+ local moderator = Player("moderator", {kick = true, ban = true})
+ assert.is_true(xban.present["admin"])
+ moderator:send_chat_message('/force_afk admin')
+ assert.is_not_true(xban.present["admin"])
+ end)
end)