Adjust test

Don't need to check write() because update_client() calls it
Make updating the structures conditional on profile changing

Based on the expectations of the tests, I am reasonably confident
that updating the in memory structures is logically part of changing
the client's profile so I put it in the if block