Created and passed the test for a factory to create posts