test(01-05): cover matrix confirm flow round trip

- assert room_id is preserved on !yes and !no callbacks
- exercise send_outgoing to confirm and cancel with user+room scope
This commit is contained in:
Mikhail Putilovskij 2026-04-03 12:27:42 +03:00
parent 35695e043f
commit 716dec5dfd
3 changed files with 160 additions and 16 deletions

View file

@ -68,15 +68,19 @@ async def test_skills_alias_to_settings_command():
async def test_yes_to_callback():
result = from_room_event(text_event("!yes"), room_id="!r:m.org", chat_id="C1")
result = from_room_event(text_event("!yes"), room_id="!room:example.org", chat_id="C7")
assert isinstance(result, IncomingCallback)
assert result.action == "confirm"
assert result.chat_id == "C7"
assert result.payload["room_id"] == "!room:example.org"
async def test_no_to_callback():
result = from_room_event(text_event("!no"), room_id="!r:m.org", chat_id="C1")
result = from_room_event(text_event("!no"), room_id="!room:example.org", chat_id="C7")
assert isinstance(result, IncomingCallback)
assert result.action == "cancel"
assert result.chat_id == "C7"
assert result.payload["room_id"] == "!room:example.org"
async def test_file_attachment():