Making the posts tests a bit more robust (#17151)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4699845c0a
Коммит
c5e1b36dd3
@@ -1335,7 +1335,7 @@ func testPostStoreGetPostsSince(t *testing.T, ss store.Store) {
|
||||
time.Sleep(time.Millisecond)
|
||||
|
||||
postList, err := ss.Post().GetPostsSince(model.GetPostsSinceOptions{ChannelId: channelId, Time: post3.CreateAt}, false)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, []string{
|
||||
post6.Id,
|
||||
@@ -1393,7 +1393,7 @@ func testPostStoreGetPostsSince(t *testing.T, ss store.Store) {
|
||||
|
||||
// And then ensure that it doesn't cause future requests to also return no results
|
||||
postList, err = ss.Post().GetPostsSince(model.GetPostsSinceOptions{ChannelId: channelId, Time: post1.CreateAt - 1}, true)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, []string{post1.Id}, postList.Order)
|
||||
|
||||
@@ -1499,7 +1499,7 @@ func testPostStoreGetPosts(t *testing.T, ss store.Store) {
|
||||
|
||||
t.Run("should return the last posts created in a channel without the threads and the reply count must be correct", func(t *testing.T) {
|
||||
postList, err := ss.Post().GetPosts(model.GetPostsOptions{ChannelId: channelId, Page: 0, PerPage: 2, SkipFetchThreads: true}, false)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, []string{
|
||||
post6.Id,
|
||||
|
||||
Ссылка в новой задаче
Block a user