diff options
Diffstat (limited to 'api/user_test.go')
-rw-r--r-- | api/user_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/api/user_test.go b/api/user_test.go index 8b95bdf55..776b17b3c 100644 --- a/api/user_test.go +++ b/api/user_test.go @@ -651,6 +651,12 @@ func TestUserUpdateRoles(t *testing.T) { t.Fatal("Should have errored, not admin") } + name := make(map[string]string) + name["new_name"] = "NewName" + if _, err := Client.UpdateTeamDisplayName(name); err == nil { + t.Fatal("should have errored - user not admin yet") + } + team2 := &model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN} team2 = Client.Must(Client.CreateTeam(team2)).Data.(*model.Team) @@ -690,6 +696,12 @@ func TestUserUpdateRoles(t *testing.T) { t.Fatal("Roles did not update properly") } } + + Client.LoginByEmail(team.Name, user2.Email, "pwd") + + if _, err := Client.UpdateTeamDisplayName(name); err != nil { + t.Fatal(err) + } } func TestUserUpdateActive(t *testing.T) { |