Add tests for RepositoriesCtrl