test: cover attribution, logging, and ad-tracking pass-through calls - #1022
Merged
Conversation
vegaro
force-pushed
the
cesar/unity-wrapper-passthrough-followup
branch
from
July 29, 2026 09:08
e10b1b2 to
2c9ab3e
Compare
Extends the pass-through suite in response to review feedback on #1010. SetAppsFlyerConversionData now exercises bool, long, float and double in addition to string/null/int/nested/list. The numeric assertions read the value back through AsLong/AsFloat/AsDouble rather than comparing the serialized text, because SimpleJSON routes every number through a double field and writes it with ToString(InvariantCulture) - a float given as 9.99f serializes as 9.989999771118164. Three raw-JSON substring checks pin the wire text the natives actually re-parse: unquoted lowercase true/false and an un-exponentiated long. Adds coverage for the logging and sync entry points (SetLogLevel, SetLogHandler, SetDebugLogsEnabled, SetAllowSharingStoreAccount, SyncPurchases, SyncAttributesAndOfferingsIfNeeded, PresentCodeRedemptionSheet, EnableAdServicesAttributionTokenCollection), the synchronous getters, TrackCustomPaywallImpression, and the five AdTracker.TrackAd* methods. The twenty string attribution setters move into a new AttributionPassthroughTests fixture, driven by one TestCaseSource that carries the wrapper method name, the call and the expected value on a single entry, so a setter cannot be added to the list without also getting asserted. SetAdjustID moves in from the old fixture. SetProxyURL is left untested: it has no public facade, and its only call site replaces the injected wrapper with a real one.
vegaro
force-pushed
the
cesar/unity-wrapper-passthrough-followup
branch
from
August 6, 2026 06:59
2c9ab3e to
eb80aef
Compare
vegaro
marked this pull request as ready for review
August 6, 2026 07:50
Member
Author
|
@rickvdl mind taking a look at this 🙏 |
rickvdl
approved these changes
Aug 28, 2026
The ad-tracking and custom paywall impression pass-through tests added to WrapperPassthroughTests already had equivalents in TrackingTests, which is where the tracking surface is covered end to end. Removed the seven duplicates and kept the one assertion that was only in the passthrough file — that the wrapper receives the same CustomPaywallImpressionParams instance the caller supplied — by folding it into the TrackingTests case that already exercises that path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vegaro
enabled auto-merge (squash)
August 28, 2026 11:11
RCGitBot
added a commit
that referenced
this pull request
Sep 3, 2026
**This is an automatic release.** ## RevenueCat SDK ### ✨ New Features * feat(singular): add setSingularDeviceID (#1062) via Guillem Corominas (@guillemcorominas) ### 🔄 Other Changes * Test purchase forwarding and result parsing (#1011) via Cesar de la Vega (@vegaro) * chore(deps): bump fastlane-plugin-revenuecat_internal from `7dd9ab9` to `6db1da0` (#1065) via dependabot[bot] (@dependabot[bot]) * test: cover attribution, logging, and ad-tracking pass-through calls (#1022) via Cesar de la Vega (@vegaro) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Release metadata and version string updates only; no purchase or auth logic changes in the diff itself. > > **Overview** > **Automatic release** that publishes **9.10.0** by bumping `.version`, both UPM `package.json` files (`com.revenuecat.purchases-unity` and `com.revenuecat.purchases-ui-unity`), and the reported plugin version on Android (`PLUGIN_VERSION`) and iOS (`platformFlavorVersion`). > > `CHANGELOG.md` and `CHANGELOG.latest.md` are rewritten for this cut: they drop the prior 9.9.1 dependency-update notes from “latest” and document what ships in **9.10.0**—notably **`SetSingularDeviceID` / Singular attribution** (#1062)—plus merged test and tooling work (purchase forwarding/result parsing, attribution/logging/ad-tracking pass-through tests, internal fastlane plugin bump). This PR does not add new SDK code; it only versions and documents already-merged changes. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 379727f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1010 for @rickvdl two comments
Note
Low Risk
Test-only changes with no production or runtime behavior modifications.
Overview
Expands EditMode wrapper passthrough coverage so the
Purchasesfacade is exercised againstPurchasesWrapperSpy, following up on prior pass-through test work (#1010).Adds
AttributionPassthroughTests, which parameterizes every string attribution/subscriber-attribute setter (email, MMP IDs, campaign fields, etc.) to assert the value reachesIPurchasesWrapperunchanged, plus a case thatnullis forwarded for attribute deletion.WrapperPassthroughTestsgains many new one-shot delegate tests (log level, deprecated debug/account flags, sync APIs, log handler, code redemption sheet, Ad Services token collection, identity/configuration getters, cached virtual currencies) and tightens AppsFlyer conversion data serialization checks for booleans, numeric types, and raw JSON shape.SetAdjustIDcoverage moves into the attribution suite;TrackingTestsnow asserts custom paywall impression params are passed by reference to the wrapper.Reviewed by Cursor Bugbot for commit 722e55f. Bugbot is set up for automated code reviews on this repo. Configure here.