One of the more famous passages in the book of Tobit occurs in the third chapter:
In that day it happened to the daughter of Ragouel, Sarah in Ecbatana of the Medes and she was rebuked by the maid-servants of her father because she was given to seven husbands and Asmodeus, the evil demon, killed them before she could be with them as a wife, and they said to her: Don't you understand that you have strangled your husbands; you have already had seven and never taken the name of any of them. (Tobit 3:7-8).
The comparison is usually with Matthew 22:25-28, a puzzle set to Jesus by the Sadducees.
There were among us seven brothers and the first, having married, died and not having seed, left his wife to his brother. Likewise the second and the third until the seventh. Last of all the wife died. In the resurrection, therefore, of whom of the seven is she the wife, for all were married to her.
The difference is that in the puzzle set by the Sadducees, the husbands are brothers. That is not said in Tobit, where there are simply seven husbands. In Tobit, the marriages were never consummated. In Matthew nothing is said about that and the presumption is that they were all consummated. So, while there are similarities between Tobit and Matthew, they do not go very deep. Tobit may serve as a backdrop to the Sadducees' question, but the differences should not be ignored.