Add tests for new api routes