Added factory and tests for Post model