(tb testing.TB)
| 308 | } |
| 309 | |
| 310 | func (th *TestHelper) InitBasic(tb testing.TB) *TestHelper { |
| 311 | th.SystemAdminUser = th.CreateUser(tb) |
| 312 | _, appErr := th.App.UpdateUserRoles(th.Context, th.SystemAdminUser.Id, model.SystemUserRoleId+" "+model.SystemAdminRoleId, false) |
| 313 | require.Nil(tb, appErr) |
| 314 | th.SystemAdminUser, appErr = th.App.GetUser(th.SystemAdminUser.Id) |
| 315 | require.Nil(tb, appErr) |
| 316 | |
| 317 | th.BasicUser = th.CreateUser(tb) |
| 318 | th.BasicUser, appErr = th.App.GetUser(th.BasicUser.Id) |
| 319 | require.Nil(tb, appErr) |
| 320 | |
| 321 | th.BasicUser2 = th.CreateUser(tb) |
| 322 | th.BasicUser2, appErr = th.App.GetUser(th.BasicUser2.Id) |
| 323 | require.Nil(tb, appErr) |
| 324 | |
| 325 | th.BasicTeam = th.CreateTeam(tb) |
| 326 | |
| 327 | th.LinkUserToTeam(tb, th.BasicUser, th.BasicTeam) |
| 328 | th.LinkUserToTeam(tb, th.BasicUser2, th.BasicTeam) |
| 329 | th.BasicChannel = th.CreateChannel(tb, th.BasicTeam) |
| 330 | th.BasicPost = th.CreatePost(tb, th.BasicChannel) |
| 331 | return th |
| 332 | } |
| 333 | |
| 334 | func (th *TestHelper) DeleteBots(tb testing.TB) *TestHelper { |
| 335 | preexistingBots, _ := th.App.GetBots(th.Context, &model.BotGetOptions{Page: 0, PerPage: 100}) |
no test coverage detected