Scheudled post test enhancement (#29187)
* Added test for user beloonging to channel but not team * Added test for read onmly channel * Added test for fetching scheduled posts for team you don;'t belong to * Added more tests * test enhancements * CI
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
56260e93d4
Коммит
7c3d71c089
@@ -519,6 +519,14 @@ func (th *TestHelper) AddUserToChannel(user *model.User, channel *model.Channel)
|
||||
return member
|
||||
}
|
||||
|
||||
func (th *TestHelper) RemoveUserFromChannel(user *model.User, channel *model.Channel) *model.AppError {
|
||||
appErr := th.App.RemoveUserFromChannel(th.Context, user.Id, user.Id, channel)
|
||||
if appErr != nil {
|
||||
panic(appErr)
|
||||
}
|
||||
return appErr
|
||||
}
|
||||
|
||||
func (th *TestHelper) CreateRole(roleName string) *model.Role {
|
||||
role, _ := th.App.CreateRole(&model.Role{Name: roleName, DisplayName: roleName, Description: roleName, Permissions: []string{}})
|
||||
return role
|
||||
|
||||
Ссылка в новой задаче
Block a user