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

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

        mockRepository.models = function (branchInfo, accessToken, cb) {