Add @help create with guided prompts and editor
This commit is contained in:
parent
d1671c60c1
commit
e94e92acea
1 changed files with 16 additions and 0 deletions
|
|
@ -186,3 +186,19 @@ async def test_at_help_requires_admin(player):
|
||||||
output = "".join(c[0][0] for c in player.writer.write.call_args_list)
|
output = "".join(c[0][0] for c in player.writer.write.call_args_list)
|
||||||
# Should be rejected by dispatch (admin=True check)
|
# Should be rejected by dispatch (admin=True check)
|
||||||
assert "permission" in output.lower()
|
assert "permission" in output.lower()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_at_help_create_with_name_prompts_title(admin_player):
|
||||||
|
"""@help create <name> should prompt for title."""
|
||||||
|
await commands.dispatch(admin_player, "@help create combat")
|
||||||
|
output = "".join(c[0][0] for c in admin_player.writer.write.call_args_list)
|
||||||
|
assert "title" in output.lower()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_at_help_create_no_args_prompts_name(admin_player):
|
||||||
|
"""@help create with no args prompts for the topic name."""
|
||||||
|
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()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue