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

It wasnarrated that Abu Hurairah said: “A funeral passed by theProphet(PBUH) and they praised (the deceased) and spoke well of himandmentioned his good characteristics. He said: ‘(Paradise is)guaranteed for him.’ Then another funeral passed by and they spokebadly of him and mentioned his bad characteristics, and he (theProphet (PBUH)) said: ‘(Hell is) guaranteed for him. You are thewitnesses of Allah on earth.’” Translation Not Available

Book Ref: Sunan Ibn Majah Book 6 Hadith 1492
Web Ref:  Sunan Ibn Majah Vol 1 Book 6 Hadith 1492