If you gave two weeks notice and got terminated immediately to prevent you from benefiting from something that would have vested in that two week period, you have an excellent legal case. Very few businesses of any reasonable size would pull that stunt, it isn't worth the headache. Some very small businesses might try it, because they may not have competent legal counsel to warn them away.