From 24154a052cc3bc9ee8eac226d6321b7efaf2b836 Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Sun, 15 Feb 2026 10:01:23 -0500 Subject: [PATCH] Add @help edit for modifying existing topics --- tests/test_help_topics.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/test_help_topics.py b/tests/test_help_topics.py index 1a5dd60..97009cc 100644 --- a/tests/test_help_topics.py +++ b/tests/test_help_topics.py @@ -202,3 +202,28 @@ async def test_at_help_create_no_args_prompts_name(admin_player): await commands.dispatch(admin_player, "@help create") output = "".join(c[0][0] for c in admin_player.writer.write.call_args_list) assert "name" in output.lower() + + +@pytest.mark.asyncio +async def test_at_help_edit_unknown_topic(admin_player): + await commands.dispatch(admin_player, "@help edit bogus") + output = "".join(c[0][0] for c in admin_player.writer.write.call_args_list) + assert "not found" in output.lower() + + +@pytest.mark.asyncio +async def test_at_help_edit_no_args(admin_player): + await commands.dispatch(admin_player, "@help edit") + output = "".join(c[0][0] for c in admin_player.writer.write.call_args_list) + assert "usage" in output.lower() + + +@pytest.mark.asyncio +async def test_at_help_edit_prompts_title(admin_player): + _help_topics["combat"] = HelpTopic( + name="combat", body="old body", title="combat primer" + ) + await commands.dispatch(admin_player, "@help edit combat") + output = "".join(c[0][0] for c in admin_player.writer.write.call_args_list) + # Should show current title as default + assert "combat primer" in output