/*** Created by npatil2 .*/ describe('person preview directive', function () { var scope, compile, $httpBackend; beforeEach(module('myitsmApp', 'templates', 'personModule')); beforeEach(function () { inject(function ($compile, $rootScope, $injector) { $httpBackend = $injector.get('$httpBackend'); this.$rootScope = $rootScope; var getLocale = function () { return readJSON('scripts/app/i18n/resources-locale_en.json'); }; $httpBackend.whenGET(/^scripts\/app\/i18n\/resources-locale_en.*$/).respond(getLocale()); $httpBackend.whenGET('/smartit/rest/serverstates').respond(200); $httpBackend.whenGET('/smartit/rest/sessionstatus?getLicenseKey=true').respond(200); compile = $compile; scope = $rootScope.$new(); }); }); function getCompiledElement() { var element = angular.element('