If you quit your job, or if your employment is terminated, your employer doesn't have to pay you. Most employers will respect your notice period. Some will not.