Skip to content

Commit 3b09003

Browse files
committed
Update PurchaseManagerTest to match return-to-continue fix
1 parent 5e3e27f commit 3b09003

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

presentation/src/testPlaystoreiap/java/org/cryptomator/presentation/service/PurchaseManagerTest.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,14 @@ class PurchaseManagerTest {
157157
}
158158

159159
@Test
160-
fun `handleInAppPurchases returns on PENDING before reaching PURCHASED for same product`() {
160+
fun `handleInAppPurchases continues past PENDING to reach PURCHASED for same product`() {
161161
val pending = mockPurchase(ProductInfo.PRODUCT_FULL_VERSION, Purchase.PurchaseState.PENDING, "token-pending", isAcknowledged = false)
162162
val purchased = mockPurchase(ProductInfo.PRODUCT_FULL_VERSION, Purchase.PurchaseState.PURCHASED, "token-purchased", isAcknowledged = true)
163+
`when`(sharedPreferencesHandler.licenseToken()).thenReturn("")
163164

164165
purchaseManager.handleInAppPurchases(listOf(pending, purchased), acknowledgePurchase = acknowledgePurchase)
165166

166-
verify(sharedPreferencesHandler, never()).setLicenseToken(anyString())
167+
verify(sharedPreferencesHandler).setLicenseToken("token-purchased")
167168
}
168169

169170
// -- Unknown state --

0 commit comments

Comments
 (0)