Sahih al-Bukhari — Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi) — Hadith No: 4459
Translation
Narrated Al-Aswad:It was mentioned in the presence of `Aisha that the Prophet (ﷺ) had appointed `Ali as successor by will. Thereupon she said, "Who said so? I saw the Prophet, while I was supporting him against my chest. He asked for a tray, and then fell on one side and expired, and I did not feel it. So how (do the people say) he appointed `Ali as his successor?