diff options
author | gpcf <gpcf@gpcf.eu> | 2024-07-28 14:00:52 +0200 |
---|---|---|
committer | gpcf <gpcf@gpcf.eu> | 2024-07-28 14:00:52 +0200 |
commit | a0aa681c1d75df603dd1d1a3211518fd40a2d986 (patch) | |
tree | 9f4835b869c6c4e50281a51377de2b0fd14df59f /spec/afk_spec.lua | |
parent | 838f4ff076f75fb2e977591c2eafd49f3a9bfba7 (diff) | |
download | xban2-master.tar.gz xban2-master.tar.bz2 xban2-master.zip |
Diffstat (limited to 'spec/afk_spec.lua')
-rw-r--r-- | spec/afk_spec.lua | 8 |
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) |