I have an inside cat that will sample each and every plant I bring into the house. This is the only time he breaks training. He's even gone after plants on top of the refrigerator. After sampling the plant, poisonous or not, he promptly throws up all over the carpet.
He never climbs on the kitchen counters or the top of the dining room table because he knows life will be miserable, if he breaks those rules. No, I don't hit him, but I do get my point across with very diluted vinegar water. He not only hates being sprayed by water, he hates cleaning off the slight taste of the vinegar water from his fur.
I think he goes after the plants more out of boredom because I am outside so much than anything else. I am not worried about him getting sick or dying, but I hate cleaning up the carpet. So, I've decided as long as he lives here, I can give up house plants and just play with plants outside.
I agree with
@Leftwood ... "It is likely that cats inherently just "know" not to eat lilies." I think all animals avoid plant foods that are poisonous to them instinctively. Of course, some animals are smarter than others, but that's the same with humans.
Smiles,
Lyn