37 lines
1.3 KiB
JavaScript
37 lines
1.3 KiB
JavaScript
/**
|
|
* Created by npatil2 .
|
|
*/
|
|
describe('Directives: releaseWizard', 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-wizard.html').respond(200);
|
|
$httpBackend.whenGET('views/dashboard/index.html').respond(200);
|
|
|
|
scope = $rootScope.$new();
|
|
compile = $compile;
|
|
}));
|
|
|
|
function createDirective(model) {
|
|
var elem, compiledElem;
|
|
|
|
elem ='<release-wizard></release-wizard>';
|
|
compiledElem = compile(elem)(scope);
|
|
scope.$digest();
|
|
return compiledElem;
|
|
}
|
|
|
|
it('should compile releaseWizard directive', inject(function ($rootScope) {
|
|
var $rootScope = $rootScope, ele = createDirective(), divElem = ele[0];
|
|
|
|
$rootScope.$digest();
|
|
expect(divElem).toBeDefined();
|
|
}));
|
|
}); |