diff --git a/Tests/BackendIntegrationTests/StoreKitIntegrationTests.swift b/Tests/BackendIntegrationTests/StoreKitIntegrationTests.swift index 59198085f0..842dbf6385 100644 --- a/Tests/BackendIntegrationTests/StoreKitIntegrationTests.swift +++ b/Tests/BackendIntegrationTests/StoreKitIntegrationTests.swift @@ -68,6 +68,27 @@ class StoreKit1IntegrationTests: BaseBackendIntegrationTests { try await self.purchaseMonthlyProduct() } + func testCanPurchaseConsumable() async throws { + let info = try await self.purchaseConsumablePackage().customerInfo + + expect(info.allPurchasedProductIdentifiers).to(contain(Self.consumable10Coins)) + } + + func testCanPurchaseConsumableMultipleTimes() async throws { + let count = 2 + + for _ in 0.. PurchaseResultData { + let offering = try await XCTAsyncUnwrap(try await Purchases.shared.offerings().offering(identifier: "coins")) + let package = try XCTUnwrap(offering.package(identifier: "10.coins")) + + return try await Purchases.shared.purchase(package: package) + } + @discardableResult func verifyEntitlementWentThrough( _ customerInfo: CustomerInfo, diff --git a/Tests/TestingApps/PurchaseTester/RevenueCat_IntegrationPurchaseTesterConfiguration.storekit b/Tests/TestingApps/PurchaseTester/RevenueCat_IntegrationPurchaseTesterConfiguration.storekit index da62d85564..871b9872b0 100644 --- a/Tests/TestingApps/PurchaseTester/RevenueCat_IntegrationPurchaseTesterConfiguration.storekit +++ b/Tests/TestingApps/PurchaseTester/RevenueCat_IntegrationPurchaseTesterConfiguration.storekit @@ -18,6 +18,21 @@ "productID" : "lifetime", "referenceName" : "lifetime", "type" : "NonConsumable" + }, + { + "displayPrice" : "0.99", + "familyShareable" : false, + "internalID" : "67E2FE0B", + "localizations" : [ + { + "description" : "10 Coins", + "displayName" : "10 Coins", + "locale" : "en_US" + } + ], + "productID" : "consumable.10_coins", + "referenceName" : "10 coins", + "type" : "Consumable" } ], "settings" : {