diff --git a/bot_test.go b/bot_test.go index 12537aad..a21ed1e0 100644 --- a/bot_test.go +++ b/bot_test.go @@ -339,14 +339,18 @@ func TestBot(t *testing.T) { t.Run("EditCaption()+ParseMode", func(t *testing.T) { b.parseMode = ModeHTML - edited, err := b.EditCaption(msg, "new caption with parse mode") + + edited, err := b.EditCaption(msg, "new caption with html") assert.NoError(t, err) - assert.Equal(t, "new caption with parse mode", edited.Caption) + assert.Equal(t, "new caption with html", edited.Caption) + assert.Equal(t, EntityBold, edited.CaptionEntities[0].Type) - b.parseMode = ModeDefault - edited, err = b.EditCaption(msg, "*new caption w/o parse mode*", ModeMarkdown) + edited, err = b.EditCaption(msg, "*new caption with markdown*", ModeMarkdown) assert.NoError(t, err) - assert.Equal(t, "new caption w/o parse mode", edited.Caption) + assert.Equal(t, "new caption with markdown", edited.Caption) + assert.Equal(t, EntityBold, edited.CaptionEntities[0].Type) + + b.parseMode = ModeDefault }) t.Run("Edit(what=InputMedia)", func(t *testing.T) {