wrote tests for documents controller