summaryrefslogtreecommitdiffstats
path: root/web/web_test.go
diff options
context:
space:
mode:
authorcpanato <ctadeu@gmail.com>2018-07-06 10:57:40 +0200
committercpanato <ctadeu@gmail.com>2018-07-06 10:57:40 +0200
commita92f5addccad0f77079308ff853a8251db5f2d09 (patch)
treef4aefb58970b38a5b561551ccd3d4cd430dbdce7 /web/web_test.go
parent4de50ddfc3ef09ddc0a56c8ff9bf2429df524aa5 (diff)
parent0896b5c64ef224f0f8835b9727d1c1b94cbe7c29 (diff)
downloadchat-a92f5addccad0f77079308ff853a8251db5f2d09.tar.gz
chat-a92f5addccad0f77079308ff853a8251db5f2d09.tar.bz2
chat-a92f5addccad0f77079308ff853a8251db5f2d09.zip
Merge remote-tracking branch 'upstream/release-5.1' into release-5.1-daily-merge-20180706
Diffstat (limited to 'web/web_test.go')
-rw-r--r--web/web_test.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/web/web_test.go b/web/web_test.go
index b53ed9618..4befa8e37 100644
--- a/web/web_test.go
+++ b/web/web_test.go
@@ -37,10 +37,13 @@ func StopTestStore() {
}
type TestHelper struct {
- App *app.App
- BasicUser *model.User
- BasicChannel *model.Channel
- BasicTeam *model.Team
+ App *app.App
+
+ BasicUser *model.User
+ BasicChannel *model.Channel
+ BasicTeam *model.Team
+
+ SystemAdminUser *model.User
}
func Setup() *TestHelper {
@@ -77,7 +80,9 @@ func Setup() *TestHelper {
}
func (th *TestHelper) InitBasic() *TestHelper {
- user, _ := th.App.CreateUser(&model.User{Email: model.NewId() + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", Password: "passwd1", EmailVerified: true, Roles: model.SYSTEM_ADMIN_ROLE_ID})
+ th.SystemAdminUser, _ = th.App.CreateUser(&model.User{Email: model.NewId() + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", Password: "passwd1", EmailVerified: true, Roles: model.SYSTEM_ADMIN_ROLE_ID})
+
+ user, _ := th.App.CreateUser(&model.User{Email: model.NewId() + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", Password: "passwd1", EmailVerified: true, Roles: model.SYSTEM_USER_ROLE_ID})
team, _ := th.App.CreateTeam(&model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: user.Email, Type: model.TEAM_OPEN})