-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: updates phone number due to conflict with other test data (this…
… is a short-term fix) (#84) also updates the expected device count based on the new bootstrapped test user
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,28 +136,28 @@ func TestUpdateUser(t *testing.T) { | |
|
||
updateBody := passage.UpdateBody{ | ||
Email: "[email protected]", | ||
Phone: "+15005550006", | ||
Phone: "+15005550012", | ||
UserMetadata: map[string]interface{}{ | ||
"example1": "123", | ||
}, | ||
} | ||
user, err := psg.UpdateUser(PassageUserID, updateBody) | ||
require.Nil(t, err) | ||
assert.Equal(t, "[email protected]", user.Email) | ||
assert.Equal(t, "+15005550006", user.Phone) | ||
assert.Equal(t, "+15005550012", user.Phone) | ||
assert.Equal(t, "123", user.UserMetadata["example1"]) | ||
|
||
secondUpdateBody := passage.UpdateBody{ | ||
Email: "[email protected]", | ||
Phone: "+15005550006", | ||
Phone: "+15005550012", | ||
UserMetadata: map[string]interface{}{ | ||
"example1": "456", | ||
}, | ||
} | ||
user, err = psg.UpdateUser(PassageUserID, secondUpdateBody) | ||
require.Nil(t, err) | ||
assert.Equal(t, "[email protected]", user.Email) | ||
assert.Equal(t, "+15005550006", user.Phone) | ||
assert.Equal(t, "+15005550012", user.Phone) | ||
assert.Equal(t, "456", user.UserMetadata["example1"]) | ||
} | ||
|
||
|
@@ -218,7 +218,7 @@ func TestListUserDevices(t *testing.T) { | |
|
||
devices, err := psg.ListUserDevices(PassageUserID) | ||
require.Nil(t, err) | ||
assert.Equal(t, 0, len(devices)) | ||
assert.Equal(t, 2, len(devices)) | ||
} | ||
|
||
// NOTE RevokeUserDevice is not tested because it is impossible to spoof webauthn to create a device to then revoke | ||
|