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 удалений

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

@@ -105,20 +105,20 @@ func TestCreateOrRestoreGroupMember(t *testing.T) {
defer th.TearDown()
group := th.CreateGroup()
g, err := th.App.CreateOrRestoreGroupMember(group.Id, th.BasicUser.Id)
g, err := th.App.UpsertGroupMember(group.Id, th.BasicUser.Id)
require.Nil(t, err)
require.NotNil(t, g)
g, err = th.App.CreateOrRestoreGroupMember(group.Id, th.BasicUser.Id)
require.NotNil(t, err)
require.Nil(t, g)
g, err = th.App.UpsertGroupMember(group.Id, th.BasicUser.Id)
require.Nil(t, err)
require.NotNil(t, g)
}
func TestDeleteGroupMember(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
group := th.CreateGroup()
groupMember, err := th.App.CreateOrRestoreGroupMember(group.Id, th.BasicUser.Id)
groupMember, err := th.App.UpsertGroupMember(group.Id, th.BasicUser.Id)
require.Nil(t, err)
require.NotNil(t, groupMember)