-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration Tests
: added test to verify re-subscription behavior
#1898
Conversation
…test Follow up to #1880. The duplicated and unnecessary `verifyEntitlementWentThrough` (that's already done by `purchaseWeeklyOffering`) didn't pass the new `verifyEntitlementIsActive`, which lead to false negatives due to the short expiration rate in weekly subscriptions.
a976179
to
31b0b2a
Compare
try await self.expireSubscription(entitlement) | ||
|
||
// 3. Resubscribe | ||
try await subscribe() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm not that familiar with this so I might be missing something but looks like we are not doing any expectations or assertions, so I guess this would just verify that it doesn't crash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah implicitly asserting that there are no errors. Also the test's purchase method verified that the entitlement is active after purchasing.
**This is an automatic release.** ### Bugfixes * `Purchases.beginRefundRequest`: ensured errors are `PublicError` (#1913) via NachoSoto (@NachoSoto) * `PurchaseTesterSwiftUI`: fixed macOS target (#1915) via NachoSoto (@NachoSoto) ### Other Changes * `SnapshotTesting`: require version 1.9.0 to keep supporting iOS 12/13 tests (#1931) via NachoSoto (@NachoSoto) * Fixed `tvOS` tests (#1928) via NachoSoto (@NachoSoto) * `pre-commit` hook: also verify leftover API keys in `PurchaseTester` (#1914) via NachoSoto (@NachoSoto) * `CircleCI`: changed iOS 12/13 to use Xcode 13 (#1918) via NachoSoto (@NachoSoto) * `PurchaseTesterSwiftUI`: removed unnecessary `UIApplicationDelegate` (#1916) via NachoSoto (@NachoSoto) * `CircleCI`: changed all jobs to use Xcode 14 (#1909) via NachoSoto (@NachoSoto) * `Atomic`: added unit test to verify `value`'s setter (#1905) via NachoSoto (@NachoSoto) * `spm build` CI job: changed to release build (#1903) via NachoSoto (@NachoSoto) * `StoreKitUnitTests`: compile on iOS 11.0+ (#1904) via NachoSoto (@NachoSoto) * `Purchases`: only expose testing data on `DEBUG` (#1902) via NachoSoto (@NachoSoto) * `Integration Tests`: added test to verify re-subscription behavior (#1898) via NachoSoto (@NachoSoto) * `IntegrationTests`: simplified `testExpireSubscription` to fix flaky test (#1899) via NachoSoto (@NachoSoto) * `Integration Tests`: actually verify that entitlement is active (#1880) via NachoSoto (@NachoSoto)
No description provided.