Этот коммит содержится в:
Arya Khochare
2024-11-11 21:25:10 +05:30
коммит произвёл GitHub
родитель 89aba8e899
Коммит 2461d0fed6
2 изменённых файлов: 12 добавлений и 7 удалений

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

@@ -39,12 +39,18 @@ func TestLeaveProviderDoCommand(t *testing.T) {
guest := th.createGuest()
th.App.AddUserToTeam(th.Context, th.BasicTeam.Id, th.BasicUser.Id, th.BasicUser.Id)
th.App.AddUserToChannel(th.Context, th.BasicUser, publicChannel, false)
th.App.AddUserToChannel(th.Context, th.BasicUser, privateChannel, false)
th.App.AddUserToTeam(th.Context, th.BasicTeam.Id, guest.Id, guest.Id)
th.App.AddUserToChannel(th.Context, guest, publicChannel, false)
th.App.AddUserToChannel(th.Context, guest, defaultChannel, false)
_, _, appErr := th.App.AddUserToTeam(th.Context, th.BasicTeam.Id, th.BasicUser.Id, th.BasicUser.Id)
require.Nil(t, appErr)
_, appErr = th.App.AddUserToChannel(th.Context, th.BasicUser, publicChannel, false)
require.Nil(t, appErr)
_, appErr = th.App.AddUserToChannel(th.Context, th.BasicUser, privateChannel, false)
require.Nil(t, appErr)
_, _, appErr = th.App.AddUserToTeam(th.Context, th.BasicTeam.Id, guest.Id, guest.Id)
require.Nil(t, appErr)
_, appErr = th.App.AddUserToChannel(th.Context, guest, publicChannel, false)
require.Nil(t, appErr)
_, appErr = th.App.AddUserToChannel(th.Context, guest, defaultChannel, false)
require.Nil(t, appErr)
t.Run("Should error when no Channel ID in args", func(t *testing.T) {
args := &model.CommandArgs{