-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #256 from mario-moura-silva/master
Add missing property last_password_reset
- Loading branch information
Showing
3 changed files
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
public class UserTest extends JsonTest<User> { | ||
|
||
private static final String json = "{\"user_id\":\"user|123\",\"connection\":\"auth0\",\"client_id\":\"client123\",\"password\":\"pwd\",\"verify_password\":true,\"username\":\"usr\",\"email\":\"[email protected]\",\"email_verified\":true,\"verify_email\":true,\"phone_number\":\"1234567890\",\"phone_verified\":true,\"verify_phone_number\":true,\"picture\":\"https://pic.ture/12\",\"name\":\"John\",\"nickname\":\"Johny\",\"given_name\":\"John\",\"family_name\":\"Walker\",\"app_metadata\":{},\"user_metadata\":{},\"blocked\":true,\"context\":\"extra information\"}"; | ||
private static final String readOnlyJson = "{\"user_id\":\"user|123\",\"last_ip\":\"10.0.0.1\",\"last_login\":\"2016-02-23T19:57:29.532Z\",\"logins_count\":10,\"created_at\":\"2016-02-23T19:57:29.532Z\",\"updated_at\":\"2016-02-23T19:57:29.532Z\",\"identities\":[]}"; | ||
private static final String readOnlyJson = "{\"user_id\":\"user|123\",\"last_ip\":\"10.0.0.1\",\"last_login\":\"2016-02-23T19:57:29.532Z\",\"last_password_reset\":\"2016-02-23T19:57:29.532Z\",\"logins_count\":10,\"created_at\":\"2016-02-23T19:57:29.532Z\",\"updated_at\":\"2016-02-23T19:57:29.532Z\",\"identities\":[]}"; | ||
|
||
@Test | ||
public void shouldHaveEmptyValuesByDefault() throws Exception{ | ||
|
@@ -113,6 +113,7 @@ public void shouldIncludeReadOnlyValuesOnDeserialize() throws Exception { | |
assertThat(user.getCreatedAt(), is(parseJSONDate("2016-02-23T19:57:29.532Z"))); | ||
assertThat(user.getUpdatedAt(), is(parseJSONDate("2016-02-23T19:57:29.532Z"))); | ||
assertThat(user.getLastLogin(), is(parseJSONDate("2016-02-23T19:57:29.532Z"))); | ||
assertThat(user.getLastPasswordReset(), is(parseJSONDate("2016-02-23T19:57:29.532Z"))); | ||
assertThat(user.getIdentities(), is(notNullValue())); | ||
assertThat(user.getLastIP(), is("10.0.0.1")); | ||
assertThat(user.getLoginsCount(), is(10)); | ||
|
@@ -142,4 +143,4 @@ public void shouldGetPasswordAsCharArray() { | |
|
||
assertThat(user.getPassword(), is(password.toCharArray())); | ||
} | ||
} | ||
} |