Add test for Document#edit