* replace interface{} with any
Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-07-05 09:46:50 +03:00
коммит произвёл GitHub
родитель b45ff0be5d
Коммит 717a4d04a9
258 изменённых файлов: 1286 добавлений и 1286 удалений

Просмотреть файл

@@ -496,7 +496,7 @@ func TestExportPostWithProps(t *testing.T) {
p1 := &model.Post{
ChannelId: dmChannel.Id,
Message: "aa" + model.NewId() + "a",
Props: map[string]interface{}{
Props: map[string]any{
"attachments": attachments,
},
UserId: th1.BasicUser.Id,
@@ -506,7 +506,7 @@ func TestExportPostWithProps(t *testing.T) {
p2 := &model.Post{
ChannelId: gmChannel.Id,
Message: "dd" + model.NewId() + "a",
Props: map[string]interface{}{
Props: map[string]any{
"attachments": attachments,
},
UserId: th1.BasicUser.Id,
@@ -545,8 +545,8 @@ func TestExportPostWithProps(t *testing.T) {
assert.Len(t, posts, 2)
assert.ElementsMatch(t, gmMembers, *posts[0].ChannelMembers)
assert.ElementsMatch(t, dmMembers, *posts[1].ChannelMembers)
assert.Contains(t, posts[0].Props["attachments"].([]interface{})[0], "footer")
assert.Contains(t, posts[1].Props["attachments"].([]interface{})[0], "footer")
assert.Contains(t, posts[0].Props["attachments"].([]any)[0], "footer")
assert.Contains(t, posts[1].Props["attachments"].([]any)[0], "footer")
}
func TestExportDMPostWithSelf(t *testing.T) {