If you did not have an employment contract, you are what is known as an employee at will. An employee at will may be fired at any time, for any reason whatsoever, except for reasons that are specifically made illegal, like discrimination against certain groups. Being able to fire at will, an employer may also do things that are "less than" firing--like demoting or reducing pay.Employers are free to set the qualifications for work or for specific jobs--again so long as they do not set illegal qualifications, such as that someone must be of a certain race.Putting these together, your employer may demote you if you lacked a qualification for the job you were promoted to. The fact that it would have been better had they found that out before granting you the promotion does not make what they did illegal.