Sunan Ibn Majah, Volume 3, Book 22, Hadith 2701 (DarusSalam) ⓘ
It was narrated from Jabir bin Abdullah that the Messenger of Allah said: “Whoever dies leaving a will, he dies on the right path and Sunnah, and he dies with piety and witness, and he dies forgiven.”
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُصَفَّى الْحِمْصِيُّ، حَدَّثَنَا بَقِيَّةُ بْنُ الْوَلِيدِ، عَنْ يَزِيدَ بْنِ عَوْفٍ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنْ مَاتَ عَلَى وَصِيَّةٍ مَاتَ عَلَى سَبِيلٍ وَسُنَّةٍ وَمَاتَ عَلَى تُقًى وَشَهَادَةٍ وَمَاتَ مَغْفُورًا لَهُ " .
also referenced under: Hadith 2701 (Reference) & Book 22, Hadith 2805 (In-Book)