tests from posts_controller
Some view refactors