refactored tests in posts.