Refactor PostsController Test