Skip to content

Commit 359b733

Browse files
committed
tests: clarify default parse mode test
1 parent ddb943d commit 359b733

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

bot_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,18 @@ func TestBot(t *testing.T) {
339339

340340
t.Run("EditCaption()+ParseMode", func(t *testing.T) {
341341
b.parseMode = ModeHTML
342-
edited, err := b.EditCaption(msg, "<b>new caption with parse mode</b>")
342+
343+
edited, err := b.EditCaption(msg, "<b>new caption with html</b>")
343344
assert.NoError(t, err)
344-
assert.Equal(t, "new caption with parse mode", edited.Caption)
345+
assert.Equal(t, "new caption with html", edited.Caption)
346+
assert.Equal(t, EntityBold, edited.CaptionEntities[0].Type)
345347

346-
b.parseMode = ModeDefault
347-
edited, err = b.EditCaption(msg, "*new caption w/o parse mode*", ModeMarkdown)
348+
edited, err = b.EditCaption(msg, "*new caption with markdown*", ModeMarkdown)
348349
assert.NoError(t, err)
349-
assert.Equal(t, "new caption w/o parse mode", edited.Caption)
350+
assert.Equal(t, "new caption with markdown", edited.Caption)
351+
assert.Equal(t, EntityBold, edited.CaptionEntities[0].Type)
352+
353+
b.parseMode = ModeDefault
350354
})
351355

352356
t.Run("Edit(what=InputMedia)", func(t *testing.T) {

0 commit comments

Comments
 (0)