import './index'; describe('component vnRoleInherited', () => { let controller; let $httpBackend; beforeEach(ngModule('account')); beforeEach(inject(($componentController, _$httpBackend_) => { $httpBackend = _$httpBackend_; controller = $componentController('vnRoleInherited', {$element: null}); })); describe('$onInit()', () => { it('should delete entity and go to index', () => { $httpBackend.expectGET('RoleRoles').respond('foo'); controller.$onInit(); $httpBackend.flush(); expect(controller.$.data).toBe('foo'); }); }); });