123
This commit is contained in:
26
tests/test_render.py
Normal file
26
tests/test_render.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from session_bot.render import build_channel_text
|
||||
|
||||
|
||||
def test_build_channel_text_includes_phrase_and_status() -> None:
|
||||
config = {
|
||||
"header": "header",
|
||||
"actors": [
|
||||
{
|
||||
"key": "astat",
|
||||
"display_name": "ASTAT",
|
||||
"link": "https://t.me/example",
|
||||
"pronouns": "he/him",
|
||||
"emoji": "🌟",
|
||||
"default_status": "backstage",
|
||||
"phrases": {"open": "принимает тейки"},
|
||||
}
|
||||
],
|
||||
"status_labels": {"open": "исполняет роль", "backstage": "в закулисье"},
|
||||
}
|
||||
state = {"actors": {"astat": {"status": "open", "phrase": "готов к игре"}}}
|
||||
|
||||
text = build_channel_text(config, state)
|
||||
|
||||
assert "ASTAT" in text
|
||||
assert "исполняет роль" in text
|
||||
assert "готов к игре" in text
|
||||
Reference in New Issue
Block a user