Skip to content

Commit

Permalink
test: updates phone number due to conflict with other test data (this…
Browse files Browse the repository at this point in the history
… is a short-term fix) (#84)

also updates the expected device count based on the new bootstrapped test user
  • Loading branch information
ctran88 authored Sep 9, 2024
1 parent e712316 commit f28b175
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f28b175

Please sign in to comment.