describe('Directives: releasePlanItemList', function () { var scope, compile, $httpBackend; beforeEach(module('myitsmApp')); beforeEach(inject(function ($injector, $compile, $rootScope) { $httpBackend = $injector.get('$httpBackend'); $httpBackend.whenGET('scripts/app/i18n/resources-locale_en-US.json').respond(200); $httpBackend.whenGET('views/asset/asset-details.html').respond(200); $httpBackend.whenGET('/smartit/rest/sessionstatus?getLicenseKey=true').respond(200); $httpBackend.whenGET('/smartit/rest/serverstates').respond(200); $httpBackend.whenGET('views/release/release-plan-item-list.html').respond(200); $httpBackend.whenGET('views/dashboard/index.html').respond(200); scope = $rootScope.$new(); compile = $compile; })); function createDirective(model) { var elem, compiledElem; elem =''; compiledElem = compile(elem)(scope); scope.$digest(); return compiledElem; } it('should compile releasePlanDetails directive', inject(function ($rootScope) { var $rootScope = $rootScope, ele = createDirective(), divElem = ele[0]; $rootScope.$digest(); expect(divElem).toBeDefined(); })); });