summaryrefslogtreecommitdiffstats
path: root/app/apptestlib.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/apptestlib.go')
-rw-r--r--app/apptestlib.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/apptestlib.go b/app/apptestlib.go
index 1b22831c9..a5c2db91c 100644
--- a/app/apptestlib.go
+++ b/app/apptestlib.go
@@ -31,6 +31,8 @@ type TestHelper struct {
BasicChannel *model.Channel
BasicPost *model.Post
+ SystemAdminUser *model.User
+
tempConfigPath string
tempWorkspace string
pluginHooks map[string]plugin.Hooks
@@ -143,6 +145,14 @@ func (me *TestHelper) InitBasic() *TestHelper {
return me
}
+func (me *TestHelper) InitSystemAdmin() *TestHelper {
+ me.SystemAdminUser = me.CreateUser()
+ me.App.UpdateUserRoles(me.SystemAdminUser.Id, model.SYSTEM_USER_ROLE_ID+" "+model.SYSTEM_ADMIN_ROLE_ID, false)
+ me.SystemAdminUser, _ = me.App.GetUser(me.SystemAdminUser.Id)
+
+ return me
+}
+
func (me *TestHelper) MakeEmail() string {
return "success_" + model.NewId() + "@simulator.amazonses.com"
}