Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zanthrash/de0da111f005395b5d16 to your computer and use it in GitHub Desktop.
Save zanthrash/de0da111f005395b5d16 to your computer and use it in GitHub Desktop.
require('./serverGroupLoadBalancersDirective.html');
describe('GCE: ServerGroupLoadBalancerSelector: Directive', function () {
beforeEach(
window.module(
require('./serverGroupLoadBalancersSelector.directive.js'),
require('exports?"ui.select"!ui-select'),
require('utils/timeFormatters.js'),
require('../../../caches/infrastructureCaches.js')
)
);
beforeEach(
function() {
window.module(function ($provide) {
$provide.decorator('infrastructureCaches', function($delegate) {
$delegate.loadBalancers = {
getStats: function() {
return {
maxAge: 33
};
}
};
return $delegate;
}
);
});
}
);
beforeEach(
window.inject(function($compile, $rootScope) {
this.scope = $rootScope.$new();
this.scope.command = {
loadBalancers: ['a', 'b', 'c']
}
this.el = angular.element('<gce-server-group-load-balancers-selector command="command"></gce-server-group-load-balancers-selector>');
this.element = $compile( this.el )(this.scope);
this.scope.$digest();
})
);
it('should ', function () {
expect(this.el.html()).toBe('some html');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment