blob: ee23b281aa0ff94bb1acab9e87c94bc6fbb7f69d [file] [log] [blame]
import * as angular from 'angular';
import 'angular-mocks';
import 'angular-ui-router';
import {IXosModelHelpersService, ModelHelpers} from './model.helpers';
let service: IXosModelHelpersService;
describe('The ModelHelpers service', () => {
beforeEach(() => {
angular
.module('test', [])
.service('ModelHelpers', ModelHelpers);
angular.mock.module('test');
});
beforeEach(angular.mock.inject((
ModelHelpers: IXosModelHelpersService,
) => {
service = ModelHelpers;
}));
it('should convert a core model name in an URL', () => {
expect(service.urlFromCoreModel('Slice')).toBe('/core/slices');
});
});