Refactored creating posts tests