Skip to content

Commit

Permalink
fix: Fix testUpdateNumber test (#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
anku255 authored Nov 20, 2023
1 parent 42e40a2 commit 3de36ad
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,8 @@ public void testUpdateNumber() throws Exception {
String newPhoneNumber = generateRandomNumber(8);
updatePhoneNumber(tenant, user.getAsJsonPrimitive("id").getAsString(), newPhoneNumber);
user.remove("phoneNumber");
user.addProperty("phoneNumber", newPhoneNumber);
// We need to normalize the phone number before adding it to the user object, as the update API performs normalization.
user.addProperty("phoneNumber", io.supertokens.utils.Utils.normalizeIfPhoneNumber(newPhoneNumber));

assertEquals(user, signInUpNumberUsingUserInputCode(userTenant, newPhoneNumber));
}
Expand Down

0 comments on commit 3de36ad

Please sign in to comment.