
307 S.E.2d 404 (1983)
Terry Clinton HULL
v.
FLOYD S. PIKE ELECTRICAL CONTRACTOR, INC.
No. 8217SC1105.
Court of Appeals of North Carolina.
October 4, 1983.
*405 C. Orville Light, Madison, for plaintiff-appellant.
*406 Smith, Moore, Smith, Schell & Hunter by J. Donald Cowan, Jr. and Jeri L. Whitfield, Greensboro, for defendant-appellee.
VAUGHN, Chief Judge.
A motion to dismiss under Rule 12(b)(6) tests the legal sufficiency of the complaint. Sutton v. Duke, 277 N.C. 94, 176 S.E.2d 161 (1970). A complaint should not be dismissed for failure to state a claim unless it appears beyond doubt that the plaintiff can prove no set of facts in support of his claim which would entitle him to relief. Id. The complaint should be liberally construed. Benton v. Construction Co., 28 N.C.App. 91, 220 S.E.2d 417 (1975). Dismissal is proper only when: (1) the complaint on its face reveals that no law supports plaintiff's claim; (2) the complaint reveals on its face that some fact essential to plaintiff's claim is missing; or (3) some fact disclosed in the complaint defeats the plaintiff's claim. Advertising Co. v. City of Charlotte, 50 N.C.App. 150, 272 S.E.2d 920 (1980). Since plaintiff, here, has brought a claim under a specific statute, the question before this Court is whether plaintiff has alleged facts supporting application of the law.
To allege a cause of action under G.S. 97-6.1, plaintiff must have been demoted or discharged and such demotion or discharge must have occurred because plaintiff, in good faith, instituted or caused to be instituted a proceeding under the North Carolina Worker's Compensation Act, or testified or is about to testify in any such proceeding. Plaintiff's complaint stated that plaintiff had been advised by defendant that there was no work for him and that he would be put on temporary layoff. Had plaintiff's complaint alleged only these facts, dismissal would have been proper since plaintiff would not have established a prima facie case of retaliatory discharge. Plaintiff's complaint, however, contained a subsequent allegation that "plaintiff is informed and believes that he is now considered on permanent layoff and that [he] has been demoted or discharged within the meaning of North Carolina General Statute 97-6.1." We think this allegation contains sufficient facts to withstand a motion to dismiss under Rule 12(b)(6).
The purpose of the complaint is to give the defendant notice of the wrong to which plaintiff complains. See Jones v. City of Greensboro, 51 N.C.App. 571, 277 S.E.2d 562 (1981); Sutton, supra; G.S. 1A-1, Rule 8. Defendant responded to plaintiff's complaint by stating as its second defense that plaintiff's discharge was not retaliatory, but rather was due to a lack of available work. Defendant's responsive pleading showed its understanding of the nature of the wrong alleged. Vagueness and ambiguity in plaintiff's complaint are not grounds for a motion to dismiss, but should have been attacked by defendant with a motion for a more definite statement. Sutton, supra; Benton, supra.
Reversed.
WHICHARD and PHILLIPS, JJ., concur.
