Sunan Ibn Majah, Volume 2, Book 6, Hadith 1492 (DarusSalam)

It was narrated that Abu Hurairah said: “A funeral passed by the Prophet and they praised (the deceased) and spoke well of him and mentioned his good characteristics. He said: ‘(Paradise is) guaranteed for him.’ Then another funeral passed by and they spoke badly of him and mentioned his bad characteristics, and he (the Prophet) said: ‘(Hell is) guaranteed for him. You are the witnesses of Allah on earth.’”

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عَلِيُّ بْنُ مُسْهِرٍ، عَنْ مُحَمَّدِ بْنِ عَمْرٍو، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ مُرَّ عَلَى النَّبِيِّ ـ صلى الله عليه وسلم ـ بِجِنَازَةٍ - فَأُثْنِيَ عَلَيْهَا خَيْرًا فِي مَنَاقِبِ الْخَيْرِ فَقَالَ ‏"‏ وَجَبَتْ ‏"‏ ‏.‏ ثُمَّ مَرُّوا عَلَيْهِ بِأُخْرَى فَأُثْنِيَ عَلَيْهَا شَرًّا فِي مَنَاقِبِ الشَّرِّ فَقَالَ ‏"‏ وَجَبَتْ إِنَّكُمْ شُهَدَاءُ اللَّهِ فِي الأَرْضِ ‏"‏ ‏.‏

sunnah.com