It was narrated from Mu'awiyah bin Qurrah, from his father that the Messenger of Allah (ﷺ) said:“Whoever makes a will as death approaches, and his will is in accordance with the book of Allah (SWT) it will be an expiation for whatever he did not pay of his Zakah during his lifetime.”
Hadith No. 2705
Sunan Ibn Majah
Gradings:
Al-Albani:
Daif
Muhammad Fouad Abd al-Baqi:
Daif
Shuaib Al Arnaut:
Very Daif