added test case for posts api end point