Pawal Dul, 27, spent the day drinking with William Grubb before returning to a house in Muirhouse Avenue, on August 18, 2011.
Edinburgh Sheriff Court heard that when the pair got back to the property, Mr Grubb fell asleep on a bed. The court was told that Dul then started assaulting him and stole his bank card – Mr Grubb then left the house and walked along the street before passers-by noticed his injuries and contacted police.
Dul, of Lochend Avenue, was arrested shortly afterwards. He pleaded guilty to a charge of assault to severe injury and theft and Sheriff Paul Arthurson QC deferred sentence.