Sha256: ee1dfeb2432519844e2569d3d729056f3c96b87f955c9bf3504a62c7f4bcd7ba
Contents?: true
Size: 1.03 KB
Versions: 18
Compression:
Stored size: 1.03 KB
Contents
describe('Directive: bstAlert', function() { var scope, compile, element, elementScope; beforeEach(module('Bastion.components', 'components/views/bst-alert.html')); beforeEach(inject(function(_$compile_, _$rootScope_) { compile = _$compile_; scope = _$rootScope_; })); beforeEach(function() { element = angular.element('<div bst-alert="info"></div>'); compile(element)(scope); scope.$digest(); elementScope = element.isolateScope(); }); it("should display an alert", function() { scope.successMessages = ['hello']; scope.$digest(); expect(element.find('.alert').length).toBe(1); }); it("should display a close icon if a close function is provided", function () { element = angular.element('<div bst-alert="info" close="close()"></div>'); compile(element)(scope); scope.$digest(); elementScope = element.isolateScope(); expect(elementScope.closeable).toBe(true); }); });
Version data entries
18 entries across 18 versions & 1 rubygems