Matteo Scandolo | bac2245 | 2017-01-03 16:35:32 -0800 | [diff] [blame] | 1 | import * as angular from 'angular'; |
| 2 | import 'angular-mocks'; |
| 3 | import 'angular-ui-router'; |
| 4 | |
Matteo Scandolo | aa024ff | 2017-01-04 15:04:46 -0800 | [diff] [blame] | 5 | import {IXosModelHelpersService, ModelHelpers} from './model.helpers'; |
Matteo Scandolo | bac2245 | 2017-01-03 16:35:32 -0800 | [diff] [blame] | 6 | |
| 7 | let service: IXosModelHelpersService; |
Matteo Scandolo | aa024ff | 2017-01-04 15:04:46 -0800 | [diff] [blame] | 8 | describe('The ModelHelpers service', () => { |
Matteo Scandolo | bac2245 | 2017-01-03 16:35:32 -0800 | [diff] [blame] | 9 | |
| 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 | }); |