/*** Created by npatil2 .*/ describe('service: l10nModel', function () { var $httpBackend; beforeEach(module('myitsmApp')); beforeEach(inject(function ($injector, l10nService) { this.l10nService = l10nService; $httpBackend = $injector.get('$httpBackend'); $httpBackend.whenGET('scripts/app/i18n/resources-locale_en-US.json').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); $rootScope = $injector.get('$rootScope'); this.l10nModel = $injector.get('l10nModel'); })); it('should defined', function () { expect(this.l10nModel).toBeDefined(); }); it('should run getLocalizedMessage ()', function () { var messageId = 123344; this.myResult = this.l10nModel.getLocalizedMessage(messageId); expect(this.myResult).toBe(undefined); }); it('should run loadSystemMessages () ', function () { this.myResult = this.l10nModel.loadSystemMessages(); expect(this.myResult.$$state.status).toEqual(0); }); });