feat: Add tests for markdown_decoration with MessageEntity(type="text_link")

The tests for `text_decorations` duplicated the tests for `html_markdown` with `type="url"` and `type="text_link"`, but there were no such tests for `markdown_decoration`
This commit is contained in:
K1rL3s 2026-02-15 07:32:33 +03:00
parent f9ba9e37c6
commit f5b8fb4580

View file

@ -48,7 +48,6 @@ class TestTextDecoration:
),
'<a href="tg://user?id=42">test</a>',
],
[html_decoration, MessageEntity(type="url", offset=0, length=5), "test"],
[
html_decoration,
MessageEntity(type="spoiler", offset=0, length=5),
@ -59,11 +58,6 @@ class TestTextDecoration:
MessageEntity(type="custom_emoji", offset=0, length=5, custom_emoji_id="42"),
'<tg-emoji emoji-id="42">test</tg-emoji>',
],
[
html_decoration,
MessageEntity(type="text_link", offset=0, length=5, url="https://aiogram.dev"),
'<a href="https://aiogram.dev">test</a>',
],
[
html_decoration,
MessageEntity(type="blockquote", offset=0, length=5),
@ -74,6 +68,12 @@ class TestTextDecoration:
MessageEntity(type="expandable_blockquote", offset=0, length=5),
"<blockquote expandable>test</blockquote>",
],
[markdown_decoration, MessageEntity(type="url", offset=0, length=5), "test"],
[
markdown_decoration,
MessageEntity(type="text_link", offset=0, length=5, url="https://aiogram.dev"),
"[test](https://aiogram.dev)"
],
[markdown_decoration, MessageEntity(type="bold", offset=0, length=5), "*test*"],
[markdown_decoration, MessageEntity(type="italic", offset=0, length=5), "_\rtest_\r"],
[markdown_decoration, MessageEntity(type="code", offset=0, length=5), "`test`"],