Skip to content

Commit

Permalink
IntegrationTests: explicit StoreKit 1 mode (#2636)
Browse files Browse the repository at this point in the history
I noticed that `BaseBackendIntegrationTests` sets the `StoreKit2Setting`
to `.default`, but in these `StoreKit 1` tests we weren't overriding
that setting.

When the default changes to `StoreKit 2`, this would have unknowingly
changed and we'd have stopped testing `StoreKit 1`.
  • Loading branch information
NachoSoto authored Jun 13, 2023
1 parent 6d9125b commit 6d53255
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class OfflineStoreKit2IntegrationTests: OfflineStoreKit1IntegrationTests {

class OfflineStoreKit1IntegrationTests: BaseOfflineStoreKitIntegrationTests {

override class var storeKit2Setting: StoreKit2Setting { return .disabled }

override func setUp() async throws {
try await super.setUp()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class StoreKit2ObserverModeIntegrationTests: StoreKit1ObserverModeIntegrationTes

class StoreKit1ObserverModeIntegrationTests: BaseStoreKitObserverModeIntegrationTests {

override class var storeKit2Setting: StoreKit2Setting { return .disabled }

func testPurchaseOutsideTheAppPostsReceipt() async throws {
try self.testSession.buyProduct(productIdentifier: Self.monthlyNoIntroProductID)

Expand All @@ -83,6 +85,8 @@ class StoreKit2ObserverModeWithExistingPurchasesTests: StoreKit1ObserverModeWith
@available(iOS 15.0, tvOS 15.0, watchOS 8.0, macOS 12.0, *)
class StoreKit1ObserverModeWithExistingPurchasesTests: BaseStoreKitObserverModeIntegrationTests {

override class var storeKit2Setting: StoreKit2Setting { return .disabled }

// MARK: - Transactions observation

private static var transactionsObservation: Task<Void, Never>?
Expand Down

0 comments on commit 6d53255

Please sign in to comment.