Changes method name, removes error case. (#11427)

* Changes method name, removes previous error case.

* Fixes test now that the method is idempotent.
Этот коммит содержится в:
Martin Kraft
2019-06-28 07:31:32 -04:00
коммит произвёл GitHub
родитель 22fb7d9116
Коммит ab4eaf898b
10 изменённых файлов: 69 добавлений и 74 удалений

Просмотреть файл

@@ -1540,7 +1540,7 @@ func TestAddTeamMember(t *testing.T) {
require.Nil(t, err)
// Add user to group
_, err = th.App.CreateOrRestoreGroupMember(th.Group.Id, otherUser.Id)
_, err = th.App.UpsertGroupMember(th.Group.Id, otherUser.Id)
require.Nil(t, err)
_, resp = th.SystemAdminClient.AddTeamMember(team.Id, otherUser.Id)
@@ -1755,7 +1755,7 @@ func TestAddTeamMembers(t *testing.T) {
require.Nil(t, err)
// Add user to group
_, err = th.App.CreateOrRestoreGroupMember(th.Group.Id, userList[0])
_, err = th.App.UpsertGroupMember(th.Group.Id, userList[0])
require.Nil(t, err)
_, resp = Client.AddTeamMembers(team.Id, userList)
@@ -2525,9 +2525,9 @@ func TestTeamMembersMinusGroupMembers(t *testing.T) {
group1 := th.CreateGroup()
group2 := th.CreateGroup()
_, err = th.App.CreateOrRestoreGroupMember(group1.Id, user1.Id)
_, err = th.App.UpsertGroupMember(group1.Id, user1.Id)
require.Nil(t, err)
_, err = th.App.CreateOrRestoreGroupMember(group2.Id, user2.Id)
_, err = th.App.UpsertGroupMember(group2.Id, user2.Id)
require.Nil(t, err)
// No permissions