blob: ee23b281aa0ff94bb1acab9e87c94bc6fbb7f69d [file] [log] [blame]
Matteo Scandolobac22452017-01-03 16:35:32 -08001import * as angular from 'angular';
2import 'angular-mocks';
3import 'angular-ui-router';
4
Matteo Scandoloaa024ff2017-01-04 15:04:46 -08005import {IXosModelHelpersService, ModelHelpers} from './model.helpers';
Matteo Scandolobac22452017-01-03 16:35:32 -08006
7let service: IXosModelHelpersService;
Matteo Scandoloaa024ff2017-01-04 15:04:46 -08008describe('The ModelHelpers service', () => {
Matteo Scandolobac22452017-01-03 16:35:32 -08009
10 beforeEach(() => {
11 angular
12 .module('test', [])
13 .service('ModelHelpers', ModelHelpers);
14
15 angular.mock.module('test');
16 });
17
18 beforeEach(angular.mock.inject((
19 ModelHelpers: IXosModelHelpersService,
20 ) => {
21 service = ModelHelpers;
22 }));
23
24 it('should convert a core model name in an URL', () => {
25 expect(service.urlFromCoreModel('Slice')).toBe('/core/slices');
26 });
27
28});