added test and route for list of posts