We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac44a8d commit c87a5bcCopy full SHA for c87a5bc
internal/api/user_test.go
@@ -197,6 +197,13 @@ func (ts *UserTestSuite) TestUserUpdatePhoneAutoconfirmEnabled() {
197
w := httptest.NewRecorder()
198
ts.API.handler.ServeHTTP(w, req)
199
require.Equal(ts.T(), c.expectedCode, w.Code)
200
+
201
+ if c.expectedCode == http.StatusOK {
202
+ // check that the user response returned contains the updated phone field
203
+ data := &models.User{}
204
+ require.NoError(ts.T(), json.NewDecoder(w.Body).Decode(&data))
205
+ require.Equal(ts.T(), data.GetPhone(), c.userData["phone"])
206
+ }
207
})
208
}
209
0 commit comments