mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
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:
parent
f9ba9e37c6
commit
f5b8fb4580
1 changed files with 6 additions and 6 deletions
|
|
@ -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`"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue