fix(tg): remove close_forum_topic from /archive — unsupported in Threaded Mode
This commit is contained in:
parent
d5ab527f5d
commit
fcf5be7efa
2 changed files with 8 additions and 6 deletions
|
|
@ -53,8 +53,11 @@ async def test_cmd_archive_closes_and_archives(fresh_db, monkeypatch):
|
|||
fresh_db.create_chat(1, 42, "Чат #1")
|
||||
msg = make_message(user_id=1, thread_id=42, chat_id=100)
|
||||
await mod.cmd_archive(msg)
|
||||
msg.bot.close_forum_topic.assert_called_once_with(chat_id=100, message_thread_id=42)
|
||||
# close_forum_topic is NOT called — unsupported in Threaded Mode personal chats
|
||||
msg.bot.close_forum_topic.assert_not_called()
|
||||
assert fresh_db.get_chat(1, 42)["archived_at"] is not None
|
||||
msg.answer.assert_called_once()
|
||||
assert "архивирован" in msg.answer.call_args[0][0]
|
||||
|
||||
|
||||
async def test_cmd_archive_unknown_topic_replies_error(fresh_db, monkeypatch):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue