Added unit test for add post with dao error.