MM-13015 Remove metadata field from post when metadata is disabled (#9882)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
79f1c1d44c
Коммит
385a0048bf
@@ -402,6 +402,10 @@ func TestPreparePostForClient(t *testing.T) {
|
||||
post = th.App.PreparePostForClient(post)
|
||||
|
||||
assert.Nil(t, post.Metadata)
|
||||
|
||||
b := post.ToJson()
|
||||
|
||||
assert.NotContains(t, string(b), "metadata", "json shouldn't include a metadata field, not even a falsey one")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user