From 359b733e3a5b0d74f3d6000f088f0ef1e23805f5 Mon Sep 17 00:00:00 2001 From: Demian Date: Wed, 10 Jun 2020 13:52:35 +0300 Subject: [PATCH] tests: clarify default parse mode test --- bot_test.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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) {