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 plaintiffs claim; (2) the complaint reveals on its face that some fact essential to plaintiffs claim is missing; or (3) some fact disclosed in the complaint defeats the plaintiffs 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 Workers’ Compensation Act, or testified or is about to testify in any such proceeding. Plaintiffs 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 plaintiffs complaint alleged only these facts, dismissal would have been proper since plaintiff would not have established a prima facie case of retaliatory discharge. Plaintiffs 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 *381demoted 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 plaintiffs complaint by stating as its second defense that plaintiffs 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 plaintiffs 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.
Judges Whichard and Phillips concur.