Writing tests to check the post creation properly