mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 11:06:53 +00:00
Setting apns push tokens should always update the timestamp
This commit is contained in:
1 parent
b539df8e48
commit
55fa60dd4e
2 files changed
+7
-2
No files matched your search
+4
-1
@@ -11,6 +11,7 @@ import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.anyByte;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.whispersystems.textsecuregcm.grpc.GrpcTestUtils.assertStatusException;
|
||||
@@ -334,7 +335,9 @@ class DevicesGrpcServiceTest extends SimpleBaseGrpcTest<DevicesGrpcService, Devi
|
||||
|
||||
final SetPushTokenResponse ignored = authenticatedServiceStub().setPushToken(request);
|
||||
|
||||
verify(accountsManager, never()).updateDevice(any(), anyByte(), any());
|
||||
// Update push token even if it matches the stored value for apns (to update the timestamp)
|
||||
verify(accountsManager, apnsToken == null ? never() : times(1))
|
||||
.updateDevice(any(), anyByte(), any());
|
||||
}
|
||||
|
||||
private static Stream<Arguments> setPushTokenUnchanged() {
|
||||
|
||||
Reference in new issue
Block a user