Skip to content

Commit

Permalink
chore: update phone autoconfirm test
Browse files Browse the repository at this point in the history
  • Loading branch information
kangmingtay committed Feb 15, 2024
1 parent ac44a8d commit c87a5bc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/api/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ func (ts *UserTestSuite) TestUserUpdatePhoneAutoconfirmEnabled() {
w := httptest.NewRecorder()
ts.API.handler.ServeHTTP(w, req)
require.Equal(ts.T(), c.expectedCode, w.Code)

if c.expectedCode == http.StatusOK {
// check that the user response returned contains the updated phone field
data := &models.User{}
require.NoError(ts.T(), json.NewDecoder(w.Body).Decode(&data))
require.Equal(ts.T(), data.GetPhone(), c.userData["phone"])
}
})
}

Expand Down

0 comments on commit c87a5bc

Please sign in to comment.