Moved modelHelpers service in the DataSources module
Change-Id: Ife4239d8f0ca0ec12ed7db17c337deb6e06e80fe
diff --git a/src/app/datasources/helpers/model.helpers.spec.ts b/src/app/datasources/helpers/model.helpers.spec.ts
new file mode 100644
index 0000000..ee23b28
--- /dev/null
+++ b/src/app/datasources/helpers/model.helpers.spec.ts
@@ -0,0 +1,28 @@
+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');
+ });
+
+});