Term: fair-weather friend
Example: when tom refused to help me move after my divorce i realized that he was a fair-weather friend
Definition: a friend who doesn't help in times of difficulty