def METHOD_NAME(
    client,
    mocker,
    api_user_pending,
    mock_update_user_attribute,
    mock_send_verify_code,
    phone_number_to_register_with,
):
    mocker.patch("app.user_api_client.get_user_by_email", return_value=api_user_pending)
    with client.session_transaction() as session:
        session["user_details"] = {
            "id": api_user_pending["id"],
            "email": api_user_pending["email_address"],
        }
    response = client.post(
        url_for("main.check_and_resend_text_code"),
        data={"mobile_number": phone_number_to_register_with},
    )
    assert response.status_code == 302
    assert response.location == url_for("main.verify")
    mock_update_user_attribute.assert_called_once_with(
        api_user_pending["id"],
        mobile_number=phone_number_to_register_with,
    )
    mock_send_verify_code.assert_called_once_with(
        api_user_pending["id"],
        "sms",
        phone_number_to_register_with,
    )