Add tests for topic and posts pagination