[CORD-1338] Inline navigation for related models

Change-Id: I58ff4a4675d1ce1140fe162f1f8360f2dc9a6527
diff --git a/src/app/datasources/helpers/model.discoverer.service.spec.ts b/src/app/datasources/helpers/model.discoverer.service.spec.ts
index d5a3232..b72b311 100644
--- a/src/app/datasources/helpers/model.discoverer.service.spec.ts
+++ b/src/app/datasources/helpers/model.discoverer.service.spec.ts
@@ -190,6 +190,30 @@
     scope.$apply();
   });
 
+  it('should add a state with relations in the system', (done) => {
+    MockXosRuntimeStates.addState.calls.reset();
+    service['addState']({name: 'Tenant', app: 'services.vsg', relations: [{model: 'Something', type: 'manytoone'}]})
+      .then((model) => {
+        expect(MockXosRuntimeStates.addState).toHaveBeenCalledWith('xos.vsg.tenant', {
+          parent: 'xos.vsg',
+          url: '/tenants/:id?',
+          params: {
+            id: null
+          },
+          data: {
+            model: 'Tenant',
+            relations: [
+              {model: 'Something', type: 'manytoone'}
+            ]
+          },
+          component: 'xosCrud',
+        });
+        expect(model.clientUrl).toBe('vsg/tenants/:id?');
+        done();
+      });
+    scope.$apply();
+  });
+
   it('should add an item to navigation', () => {
     service['addNavItem']({name: 'Tenant', app: 'services.vsg'});
     expect(MockXosNavigationService.add).toHaveBeenCalledWith({