Skip to content

Instantly share code, notes, and snippets.

@leegee
Created January 20, 2016 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leegee/cb0bf035f6547ab48642 to your computer and use it in GitHub Desktop.
Save leegee/cb0bf035f6547ab48642 to your computer and use it in GitHub Desktop.
beforeEach( module('thinMonitor') );
beforeEach( inject( function ($injector, $rootScope) {
rootScope = $rootScope;
scope = $rootScope.$new();
scope.grid = MOCKS.grid;
controller = $injector.get('$controller')('templateDialogController', {
$rootScope : $rootScope,
$scope : scope,
dialogInstance : MOCKS.dialogInstance,
monitorInstance : MOCKS.monitorInstance,
jet : MOCKS.jet,
dialog : MOCKS.dialog,
userTemplate : MOCKS.userTemplate
});
}));
beforeEach(module('thinMonitor'));
beforeEach( function () {
module( function ($provide) {
$provide.value( 'dialogManager', mockDialogManager);
});
inject( function ($injector, $rootScope) {
service = $injector.get('loadingDialog');
scope = $rootScope.$new();
});
mockDialogManager.open = jasmine.createSpy('mockDialogManager.open').and.returnValue({
afterClose: jasmine.createSpy('mockDialogManager.afterClose').and.returnValue({
then: function (selectedMonitor) {
// console.log('afterClose.close',selectedMonitor)
}
})
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment