Skip to content

Commit

Permalink
test: fix tests for phone number client update (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasLopes7 authored Sep 2, 2024
1 parent a6655da commit 98b664a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions phonenumber/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func TestPhoneNumberClientUpdate(t *testing.T) {
config.HTTPClient = &http.Client{
Transport: &clerktest.RoundTripper{
T: t,
In: json.RawMessage(`{"verified":true}`),
Out: json.RawMessage(fmt.Sprintf(`{"id":"%s","verification":{"status":"verified"}}`, id)),
In: json.RawMessage(`{"verified":true, "reserved_for_second_factor":true}`),
Out: json.RawMessage(fmt.Sprintf(`{"id":"%s","reserved_for_second_factor":true,"verification":{"status":"verified"}}`, id)),
Method: http.MethodPatch,
Path: "/v1/phone_numbers/" + id,
},
Expand All @@ -59,6 +59,7 @@ func TestPhoneNumberClientUpdate(t *testing.T) {
require.NoError(t, err)
require.Equal(t, id, phoneNumber.ID)
require.Equal(t, "verified", phoneNumber.Verification.Status)
require.Equal(t, true, phoneNumber.ReservedForSecondFactor)
}

func TestPhoneNumberClientGet(t *testing.T) {
Expand Down

0 comments on commit 98b664a

Please sign in to comment.