Add tests for writings controller