1
0
mirror of synced 2024-11-29 00:26:12 +03:00
messenger/response_test.go

18 lines
382 B
Go
Raw Normal View History

2021-02-17 15:25:52 +03:00
package messenger
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func Test_MarshalStructuredMessageElement(t *testing.T) {
data, err := json.Marshal(StructuredMessageElement{
Title: "Title",
})
require.NoError(t, err)
assert.JSONEq(t, string(data), `{"image_url":"", "subtitle":"", "title": "Title"}`)
}