Add unit tests for user and posts