Skip to content

Commit c87a5bc

Browse files
committed
chore: update phone autoconfirm test
1 parent ac44a8d commit c87a5bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/api/user_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ func (ts *UserTestSuite) TestUserUpdatePhoneAutoconfirmEnabled() {
197197
w := httptest.NewRecorder()
198198
ts.API.handler.ServeHTTP(w, req)
199199
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+
}
200207
})
201208
}
202209

0 commit comments

Comments
 (0)