"A woman's loyalty is tested when the man does not have anything. A man's loyalty is tested when the woman has everything."
I rewrote the second sentence so it "mirrors" the first sentence more accurately - I hope this still goes with your original intention. (I'm not sure who you meant by "they".)
The articles needed close revision, so here's how it works...
Women's = women in general. You're talking about females as a collective. When you say "the men's" you mean a specific group of men... but you haven't told us which group - we need to know.
I used "a woman's/a man's" to mean "take any one woman or man, as an example". I followed with "the man / the woman" to suggest one specific person in this context: we assume it is their partner. If you use "a", it could mean any possible man/woman.