refactor tests and all passing tests for posts