-
-
Notifications
You must be signed in to change notification settings - Fork 735
Fix signUp and linkWith with an anonymous user #72
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
Conversation
Still writing a unit test that will simulate this behavior for the future. |
So it doesn't seem like there's a good way to write a unit test as the scenario is more of a integration test scenario, especially since I added |
5d90e09
to
7d71b2e
Compare
LGTM |
So this is basically the same as our initial behavior, except |
@lukas1994 yeah we have integration tests for this. they're currently failing and this makes them pass @hallucinogen pretty much |
Fixes integration test failures caused by #52 We strip anonymity in `signUp` and `linkWith` before calling into `saveAsync` where there's a fork in logic for `isLazy()`. Since we now determine `isLazy()` based off `objectId != null && ParseAnonymousUtils.isLinked(this)`, `isLazy()` returns the incorrect value for these logic paths. The solution is to get the value of `isLazy()` before stripping anonymity and passing it through to `saveAsync()`. * Callers of resolveLazinessAsync never use it's return value, might as well make it Void * Make signUp more robust by reverting current user's password on failure if that's how it originally was * Make signUp more robust by reverting the current user's password on success
7d71b2e
to
fc249c0
Compare
Fix signUp and linkWith with an anonymous user
@grantland updated the pull request. |
Fixes integration test failures caused by #52
We strip anonymity in
signUp
andlinkWith
before calling intosaveAsync
where there's a fork in logic forisLazy()
. Since we nowdetermine
isLazy()
based offobjectId != null && ParseAnonymousUtils.isLinked(this)
,isLazy()
returns the incorrect value for these logic paths.The solution is to get the value of
isLazy()
before stripping anonymityand passing it through to
saveAsync()
.Void