A man from the tribe of Banu Sahm set out on a journey with Tamim Dari and Adi bin Bada. The man from Banu Sahm died in a land where no Muslim was present. When the two returned with his estate, the family found that a silver cup decorated with gold was missing.The Messenger of Allah ﷺ had the two men swear an oath. Later, the cup turned up in Mecca, and the people there said, "We bought it from Tamim and Adi."Then two relatives of the deceased stood up and swore, "Our testimony is more truthful than their testimony, and the cup indeed belongs to our kinsman."The narrator said, "It was concerning them that this verse was revealed, 'You who believe, when death approaches one of you, let testimony be taken among you'" [Maidah 5:106].
خرج رجل من بني سهم مع تميم الداري وعدي بن بداء، فمات السهمي بأرض ليس بها مسلم، فلما قدما بتركته فقدوا جاما من فضة مخوصا من ذهب، فأحلفهما رسول الله ﷺ، ثم وجد الجام بمكة، فقالوا: ابتعناه من تميم وعدي. فقام رجلان من أوليائه، فحلفا لشهادتنا أحق من شهادتهما، وإن الجام لصاحبهم، قال: وفيهم نزلت هذه الآية {يايها الذين امنوا شهادة بينكم اذا حضر احدكم الموت}
Bukhari narrated it in "Wills" (2780), saying, "Ali bin Abdullah told me, Ibn Abu Zaida told us, from Muhammad bin Abu Qasim, from Abdul-Malik bin Saeed bin Jubayr, from his father, from Ibn Abbas," and he related it.His statement, "Ali bin Abdullah told me (he is Madini, one of Bukhari's teachers)," its ruling is that it is connected, as I explained previously.