/*** Created by npatil2 .*/ describe('EmailPopupWindowController', function () { 'use strict'; var $httpBackend; beforeEach(module('myitsmApp')); beforeEach(inject(function ($injector, $rootScope, $controller, emailModel) { this.scope = $rootScope.$new(); this.searchModel = emailModel; this.controller = $controller; window.opener = {popupDetails: 'test'}; this.controllerInstance = this.controller('EmailPopupWindowController', { $scope: this.scope }); })); beforeEach(inject(function ($injector) { $httpBackend = $injector.get('$httpBackend'); 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/v2/metadata?type=global').respond(200); $httpBackend.whenGET('/smartit/restapi/person/supportgroupperson').respond(200); $httpBackend.whenGET('/smartit/rest/serverstates').respond(200); $httpBackend.whenGET('/smartit/rest/sessionstatus?getLicenseKey=true').respond(200); $httpBackend.whenGET('views/dashboard/index.html').respond(200); })); it('should be defined', function () { expect(this.controllerInstance).toBeDefined(); expect(this.scope.emailModel).toBeTruthy(); }); });