Этот коммит содержится в:
Ben Schumacher
2024-04-24 11:52:33 +02:00
коммит произвёл GitHub
родитель 92a6c6517d
Коммит 30d450c4d8
45 изменённых файлов: 221 добавлений и 215 удалений

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

@@ -1077,11 +1077,11 @@ func TestSendPushNotifications(t *testing.T) {
require.Nil(t, err)
t.Run("should return error if data is not valid or nil", func(t *testing.T) {
err := th.App.sendPushNotificationToAllSessions(nil, th.BasicUser.Id, "")
err := th.App.sendPushNotificationToAllSessions(th.Context, nil, th.BasicUser.Id, "")
require.NotNil(t, err)
assert.Equal(t, "api.push_notifications.message.parse.app_error", err.Id)
// Errors derived of using an empty object are handled internally through the notifications log
err = th.App.sendPushNotificationToAllSessions(&model.PushNotification{}, th.BasicUser.Id, "")
err = th.App.sendPushNotificationToAllSessions(th.Context, &model.PushNotification{}, th.BasicUser.Id, "")
require.Nil(t, err)
})
}