Expand Plugin and REST APIs to trigger user typing event (#14331)

Этот коммит содержится в:
Attila Molnar
2020-06-16 16:41:05 +07:00
коммит произвёл GitHub
родитель 8c1164d86b
Коммит 66597d0fcb
14 изменённых файлов: 267 добавлений и 8 удалений

20
model/typing_request_test.go Обычный файл
Просмотреть файл

@@ -0,0 +1,20 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package model
import (
"strings"
"testing"
"github.com/stretchr/testify/require"
)
func TestTypingRequestJson(t *testing.T) {
o := TypingRequest{ChannelId: NewId(), ParentId: NewId()}
json := o.ToJson()
ro := TypingRequestFromJson(strings.NewReader(json))
require.Equal(t, o.ChannelId, ro.ChannelId, "ChannelIds do not match")
require.Equal(t, o.ParentId, ro.ParentId, "ParentIds do not match")
}