Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1
Этот коммит содержится в:
@@ -422,3 +422,18 @@ func (_m *PostStore) Update(newPost *model.Post, oldPost *model.Post) store.Stor
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
func (_m *PostStore) GetMaxPostSize() store.StoreChannel {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 store.StoreChannel
|
||||
if rf, ok := ret.Get(0).(func() store.StoreChannel); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(store.StoreChannel)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ func TestPostStore(t *testing.T, ss store.Store) {
|
||||
t.Run("GetPostsBatchForIndexing", func(t *testing.T) { testPostStoreGetPostsBatchForIndexing(t, ss) })
|
||||
t.Run("PermanentDeleteBatch", func(t *testing.T) { testPostStorePermanentDeleteBatch(t, ss) })
|
||||
t.Run("GetOldest", func(t *testing.T) { testPostStoreGetOldest(t, ss) })
|
||||
t.Run("TestGetMaxPostSize", func(t *testing.T) { testGetMaxPostSize(t, ss) })
|
||||
}
|
||||
|
||||
func testPostStoreSave(t *testing.T, ss store.Store) {
|
||||
@@ -1783,3 +1784,8 @@ func testPostStoreGetOldest(t *testing.T, ss store.Store) {
|
||||
|
||||
assert.EqualValues(t, o2.Id, r1.Id)
|
||||
}
|
||||
|
||||
func testGetMaxPostSize(t *testing.T, ss store.Store) {
|
||||
assert.Equal(t, model.POST_MESSAGE_MAX_RUNES_V2, (<-ss.Post().GetMaxPostSize()).Data.(int))
|
||||
assert.Equal(t, model.POST_MESSAGE_MAX_RUNES_V2, (<-ss.Post().GetMaxPostSize()).Data.(int))
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user