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
Этот коммит содержится в:
Harshil Sharma
2024-11-12 12:29:29 +05:30
коммит произвёл GitHub
родитель 56260e93d4
Коммит 7c3d71c089
4 изменённых файлов: 222 добавлений и 1 удалений

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

@@ -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