add unit test for post with API