Migrate "Post.GetPostsByIds" to Sync by default (#11034)

Этот коммит содержится в:
GianOrtiz
2019-06-04 18:25:16 -03:00
коммит произвёл Jesse Hallam
родитель a57e042dab
Коммит b26e5d444e
6 изменённых файлов: 39 добавлений и 30 удалений

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

@@ -260,10 +260,9 @@ func AssertFileIdsInPost(files []*model.FileInfo, th *TestHelper, t *testing.T)
postId := files[0].PostId
assert.NotNil(t, postId)
if result := <-th.App.Srv.Store.Post().GetPostsByIds([]string{postId}); result.Err != nil {
t.Fatal(result.Err.Error())
if posts, err := th.App.Srv.Store.Post().GetPostsByIds([]string{postId}); err != nil {
t.Fatal(err.Error())
} else {
posts := result.Data.([]*model.Post)
assert.Equal(t, len(posts), 1)
for _, file := range files {
assert.Contains(t, posts[0].FileIds, file.Id)