Added test case to DialogServiceSpec

This commit is contained in:
Henry 2015-10-23 12:01:48 -07:00
parent 78b528b4a5
commit fa7431d68b
2 changed files with 15 additions and 7 deletions

View File

@ -121,6 +121,17 @@ define(
);
});
it("invokes the overlay service with the correct parameters when" +
" a blocking dialog is requested", function() {
var dialogModel = {};
expect(dialogService.showBlockingMessage(dialogModel)).toBe(true);
expect(mockOverlayService.createOverlay).toHaveBeenCalledWith(
"overlay-blocking-message",
dialogModel,
"t-dialog-sm"
);
});
});
}
);

View File

@ -34,13 +34,10 @@ define(
beforeEach(function(){
mockNotificationService = jasmine.createSpy("notificationService");
mockScope = jasmine.createSpy("$scope");
mockDialogService = {
getDialogResponse: function(template, model){},
dismiss: function(){}
}
spyOn(mockDialogService, 'getDialogResponse');
spyOn(mockDialogService, 'dismiss');
mockDialogService = jasmine.createSpyObj(
"dialogService",
["getDialogResponse","dismiss"]
);
});
it("exposes the highest notification severity to the template", function() {