diff --git a/src/alert/test/alert.spec.js b/src/alert/test/alert.spec.js index bfca85b298..5f7e220e3a 100644 --- a/src/alert/test/alert.spec.js +++ b/src/alert/test/alert.spec.js @@ -59,11 +59,12 @@ describe('alert', function () { } }); - it('should show close buttons', function () { + it('should show close buttons and have the dismissable class', function () { var alerts = createAlerts(); for (var i = 0, n = alerts.length; i < n; i++) { expect(findCloseButton(i).css('display')).not.toBe('none'); + expect(alerts.eq(i)).toHaveClass('alert-dismissable'); } }); @@ -81,10 +82,11 @@ describe('alert', function () { expect(scope.removeAlert).toHaveBeenCalledWith(1); }); - it('should not show close buttons if no close callback specified', function () { + it('should not show close button and have the dismissable class if no close callback specified', function () { element = $compile('No close')(scope); scope.$digest(); expect(findCloseButton(0)).toBeHidden(); + expect(element).not.toHaveClass('alert-dismissable'); }); it('should be possible to add additional classes for alert', function () { diff --git a/template/alert/alert.html b/template/alert/alert.html index 957d6ec444..bb43e01c04 100644 --- a/template/alert/alert.html +++ b/template/alert/alert.html @@ -1,4 +1,4 @@ -
- +
+