Skip to content
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

Clean up authData when linkWithAsync() fails #787

Merged
merged 1 commit into from
Mar 6, 2018
Merged

Clean up authData when linkWithAsync() fails #787

merged 1 commit into from
Mar 6, 2018

Conversation

mhartvick
Copy link
Contributor

This was causing isLinked(myAuthType) to be true after a linkWithAsync() would fail for myAuthType, as explained in #767

This PR would make the behavior on both iOS and Android the same.

@@ -699,13 +699,13 @@ public void testlinkWithInBackgroundWithSaveAsyncFailure() throws Exception {
partialMockUser.linkWithInBackground(authType, authData);
linkTask.waitForCompletion();

// Make sure new authData is added
assertSame(authData, partialMockUser.getAuthData().get(authType));
Copy link
Contributor Author

@mhartvick mhartvick Feb 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same test/comment from testlinkWithInBackgroundWithSaveAsyncSuccess() above, which makes me think it was expected in the test only because it was copied

@codecov
Copy link

codecov bot commented Feb 9, 2018

Codecov Report

Merging #787 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #787      +/-   ##
============================================
+ Coverage     53.34%   53.35%   +<.01%     
  Complexity     1749     1749              
============================================
  Files           132      132              
  Lines         10267    10268       +1     
  Branches       1426     1426              
============================================
+ Hits           5477     5478       +1     
  Misses         4337     4337              
  Partials        453      453
Impacted Files Coverage Δ Complexity Δ
Parse/src/main/java/com/parse/ParseUser.java 77.14% <100%> (+0.04%) 107 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71d9d9b...da63c2f. Read the comment docs.

@flovilmart
Copy link
Contributor

@rogerhu this seems reasonable as the iOS SDK is performing the same
https://github.com/parse-community/Parse-SDK-iOS-OSX/blob/master/Parse/Parse/PFUser.m#L896

@rogerhu
Copy link
Contributor

rogerhu commented Feb 9, 2018

Great thanks.

@rogerhu rogerhu merged commit 2b3a68f into parse-community:master Mar 6, 2018
bitterbit pushed a commit to bitterbit/Parse-SDK-Android that referenced this pull request Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants