mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 18:26:53 +00:00
Allow cancellation of an expired purchaseToken
This commit is contained in:
1 parent
469955aec9
commit
b7fee7b426
2 files changed
+13
-1
No files matched your search
+10
@@ -181,6 +181,16 @@ class GooglePlayBillingManagerTest {
|
||||
verify(cancel, times(wanted)).execute();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cancelMissingSubscription() throws IOException {
|
||||
final HttpResponseException mockException = mock(HttpResponseException.class);
|
||||
when(mockException.getStatusCode()).thenReturn(404);
|
||||
when(subscriptionsv2Get.execute()).thenThrow(mockException);
|
||||
assertThatNoException().isThrownBy(() ->
|
||||
googlePlayBillingManager.cancelAllActiveSubscriptions(PURCHASE_TOKEN).join());
|
||||
verifyNoInteractions(cancel);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getReceiptUnacknowledged() throws IOException {
|
||||
when(subscriptionsv2Get.execute()).thenReturn(new SubscriptionPurchaseV2()
|
||||
|
||||
Reference in new issue
Block a user