Writing functional test to test the post edit and delete functionality