(tb testing.TB)
| 175 | } |
| 176 | |
| 177 | func (th *TestHelper) InitBasic(tb testing.TB) *TestHelper { |
| 178 | tb.Helper() |
| 179 | |
| 180 | th.SystemAdminUser = th.CreateUser(tb) |
| 181 | _, appErr := th.App.UpdateUserRoles(th.Context, th.SystemAdminUser.Id, model.SystemUserRoleId+" "+model.SystemAdminRoleId, false) |
| 182 | require.Nil(tb, appErr) |
| 183 | th.SystemAdminUser, appErr = th.App.GetUser(th.SystemAdminUser.Id) |
| 184 | require.Nil(tb, appErr) |
| 185 | |
| 186 | th.BasicUser = th.CreateUser(tb) |
| 187 | th.BasicUser, appErr = th.App.GetUser(th.BasicUser.Id) |
| 188 | require.Nil(tb, appErr) |
| 189 | |
| 190 | th.BasicUser2 = th.CreateUser(tb) |
| 191 | th.BasicUser2, appErr = th.App.GetUser(th.BasicUser2.Id) |
| 192 | require.Nil(tb, appErr) |
| 193 | |
| 194 | th.BasicTeam = th.CreateTeam(tb) |
| 195 | |
| 196 | return th |
| 197 | } |
| 198 | |
| 199 | func (th *TestHelper) CreateTeam(tb testing.TB) *model.Team { |
| 200 | tb.Helper() |
no test coverage detected