it('should error 500 when fetching the branches for the specified repo', function () {

        var error = new Error('branches error');

        mockRepository.branches = function (repoInfo, accessToken, cb) {