Moved config to ngConstant to mount that from outside the container
Change-Id: I23169cdeeae9034ea97e94089dcdbca3179bbb23
diff --git a/src/app/core/services/navigation.spec.ts b/src/app/core/services/navigation.spec.ts
index c5fb85d..62e8d3c 100644
--- a/src/app/core/services/navigation.spec.ts
+++ b/src/app/core/services/navigation.spec.ts
@@ -8,15 +8,46 @@
let defaultRoutes: IXosNavigationRoute[];
+const mockRoutes = [
+ {
+ label: 'Slices',
+ state: 'xos.core.slices'
+ },
+ {
+ label: 'Instances',
+ state: 'xos.core.instances'
+ },
+ {
+ label: 'Nodes',
+ state: 'xos.core.nodes'
+ }
+];
+
describe('The Navigation service', () => {
- beforeEach(angular.mock.module(xosCore));
+ beforeEach(() => {
+ angular.module(xosCore)
+ .value('StyleConfig', {
+ routes: mockRoutes
+ });
+
+ angular.mock.module(xosCore);
+ });
beforeEach(angular.mock.inject((
NavigationService: IXosNavigationService,
) => {
service = NavigationService;
- defaultRoutes = angular.copy(service.query());
+ defaultRoutes = [
+ {
+ label: 'Home',
+ state: 'xos.dashboard'
+ },
+ {
+ label: 'Core',
+ state: 'xos.core'
+ }
+ ].concat(mockRoutes);
}));
it('should return navigation routes', () => {