Füge Unterstützung für die Installation-ID in Push-Token-Registrierung hinzu: Aktualisiere API- und Datenbank-Logik zur Speicherung der Installation-ID.
This commit is contained in:
@@ -247,7 +247,7 @@ describe('Config & Profil Endpoints', () => {
|
||||
|
||||
it('speichert Android-Push-Token am Benutzer', async () => {
|
||||
const event = createEvent({ headers: { authorization: 'Bearer android-token' } })
|
||||
mockSuccessReadBody({ token: 'fcm-token', platform: 'android', appVersion: '1.0+1' })
|
||||
mockSuccessReadBody({ token: 'fcm-token', platform: 'android', appVersion: '1.0+1', installationId: 'firebase-installation-id' })
|
||||
const users = [{ id: '1', email: 'max@test.de', roles: ['mitglied'] }]
|
||||
authUtils.verifyToken.mockReturnValue({ id: '1' })
|
||||
authUtils.getUserFromToken.mockResolvedValue(users[0])
|
||||
@@ -260,7 +260,7 @@ describe('Config & Profil Endpoints', () => {
|
||||
expect(authUtils.writeUsers).toHaveBeenCalledWith([
|
||||
expect.objectContaining({
|
||||
id: '1',
|
||||
pushTokens: [expect.objectContaining({ token: 'fcm-token', platform: 'android', appVersion: '1.0+1' })]
|
||||
pushTokens: [expect.objectContaining({ token: 'fcm-token', platform: 'android', appVersion: '1.0+1', installationId: 'firebase-installation-id' })]
|
||||
})
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user