refactored the post controller tests