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

MLIBZ-2503: User.me() does not delete newly-empty fields on the SDK #299

Merged
merged 3 commits into from May 24, 2018

Conversation

@thomasconner
Copy link
Contributor

commented May 24, 2018

Steps to reproduce

  1. Log into any web app using kinvey-html5-sdk
  2. Check the value of a field in the current user's record to make sure it is non-empty – both in the Console -> Identity -> Users page, and in the client app.
  3. In the Console -> Identity -> Users page, manually update/erase the value of the field.
  4. In the client app, call user.me() on the current user - the saved active user in the SDK is not updated with the deleted property - the code here merges the updated fields but does not remove deleted properties.

Expected result

The field value should be empty/deleted from the current user's data in the client.

Actual result

The field value still exists that was empty/deleted.

Changes

  • Remove merging of data returned in the response from the /_me endpoint. The active user data is now replaced with the data returned in the response from /_me endpoint.

Tests

  • Remove irrelevant unit tests due to this change.
  • Update an existing unit tests that checks that values are removed correctly.

@thomasconner thomasconner self-assigned this May 24, 2018

@thomasconner thomasconner requested a review from heyzooi May 24, 2018

@heyzooi
Copy link
Contributor

left a comment

simple and clean! LGTM!

@thomasconner thomasconner merged commit e3f8aff into master May 24, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@thomasconner thomasconner deleted the MLIBZ-2503 branch May 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.