Skip to content

Commit

Permalink
tests: clarify default parse mode test
Browse files Browse the repository at this point in the history
  • Loading branch information
demget committed Jun 10, 2020
1 parent ddb943d commit 359b733
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions bot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<b>new caption with parse mode</b>")

edited, err := b.EditCaption(msg, "<b>new caption with html</b>")
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) {
Expand Down

0 comments on commit 359b733

Please sign in to comment.