Asma bint Abu Bakr reported,

I came to Ayesha while she was praying, so I said, "What is the matter with the people?" She pointed toward the sky, and there were the people standing.She said, "Glory be to Allah."I asked, "Is it a sign?"She nodded with her head, meaning yes. So I stood until I was overcome by faintness, and I began pouring water over my head.Then the Prophet ﷺ praised Allah عز وجل and extolled Him, then said, "There is nothing I had not been shown that I have now seen from this place of mine, even Paradise and Hell. It has been revealed to me that you will be tested in your graves, similar to or close to" — I do not know which of the two Asma said — "the trial of the Messiah, the Dajjal. It will be said, 'What do you know about this man?' As for the believer," or "the one with certainty" — I do not know which of the two Asma said — "he will say, 'He is Muhammad, the Messenger of Allah. He came to us with clear proofs and guidance, so we responded and followed. He is Muhammad,' three times. Then it will be said, 'Sleep righteously. We already knew that you were certain of him.' But as for the hypocrite," or "the doubter" — I do not know which of the two Asma said — "he will say, 'I do not know. I heard the people saying something, so I said it.'"

Bukhari 86

Sahih

حدثنا موسى بن إسماعيل قال حدثنا وهيب قال حدثنا هشام عن فاطمة

عن أسماء قالت

أتيت عائشة وهي تصلي فقلت ما شأن الناس فأشارت إلى السماء فإذا الناس قيام فقالت سبحان الله قلت آية فأشارت برأسها أي نعم فقمت حتى تجلاني الغشي فجعلت أصب على رأسي الماء فحمد الله عز وجل النبي ﷺ وأثنى عليه ثم قال ما من شيء لم أكن أريته إلا رأيته في مقامي حتى الجنة والنار فأوحي إلي أنكم تفتنون في قبوركم مثل أو قريب لا أدري أي ذلك قالت أسماء من فتنة المسيح الدجال يقال ما علمك بهذا الرجل فأما المؤمن أو الموقن لا أدري بأيهما قالت أسماء فيقول هو محمد رسول الله جاءنا بالبينات والهدى فأجبنا واتبعنا هو محمد ثلاثا فيقال نم صالحا قد علمنا إن كنت لموقنا به وأما المنافق أو المرتاب لا أدري أي ذلك قالت أسماء فيقول لا أدري سمعت الناس يقولون شيئا فقلته

البخاري 86صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Knowledge
Chapter
Whoever answered a fatwa by a gesture of the hand or head
Numbering
Darussalam 86
Bukhari 86