When this happened to him, DNA tests were not really a thing. That is no excuse for you young guys now though. No matter what, no matter how loyal she seems, no matter if you are married or not, quietly get a DNA test if you live in the US. No need to ask the mother for one. No need to argue about the idea of getting one. Just quietly get one, and then make your decision on what you need to do once you have the actual results in hand.
This is an issue that we as men in the US can easily resolve for ourselves until the laws are put into place making at birth paternity tests mandatory. So it is better to spend the few dollars needed to know the truth, than it is to be on the hook for a child gained through infidelity. Doing it without seeking the permission of the mother just makes it an easy no-hassle process.