Sunan Abi Dawud Book 14, Hadith 145
Some food was presented to me and Hafsah. We were fasting, but broke our fast. Then the Messenger of Allah (ﷺ) entered upon us. We said to him: A gift was presented to us; we coveted it and we broke our fast. The Messenger of Allah (ﷺ) said: There is no harm to you; keep a fast another day in lieu of it.
On the days of the conquest of Mecca, when Mecca was captured, Fatimah came and sat on the left side of the Messenger of Allah (ﷺ), and Umm Hani was on his right side. A slave-girl brought a vessel which contained some drink; she gave it to him and he drank of it. He then gave it to Umm Hani who drank of it. She said: Messenger of Allah, I have broken my fast; I was fasting. He said to her: Were you making atonement for something? She replied: No. He said: Then it does not harm you if it was voluntary (fast).
It is not allowable for a woman to keep (voluntary) fast when her husband is present without his permission, and she may not allow anyone to enter his house without his permission.