diff --git a/src/alert/docs/readme.md b/src/alert/docs/readme.md
index 3361f6418e..cf0bcad1ab 100644
--- a/src/alert/docs/readme.md
+++ b/src/alert/docs/readme.md
@@ -5,15 +5,11 @@ This directive can be used both to generate alerts from static and dynamic model
* `close()`
$ -
A callback function that gets fired when an `alert` is closed. If the attribute exists, a close button is displayed as well.
-
+
* `dismiss-on-timeout`
_(Default: `none`)_ -
Takes the number of milliseconds that specify the timeout duration, after which the alert will be closed. This attribute requires the presence of the `close` attribute.
-
+
* `template-url`
_(Default: `uib/template/alert/alert.html`)_ -
Add the ability to override the template used in the component.
-
-* `type`
- _(Default: `warning`)_ -
- Defines the type of the alert. Go to [bootstrap page](http://getbootstrap.com/components/#alerts) to see the type of alerts available.
diff --git a/src/alert/test/alert.spec.js b/src/alert/test/alert.spec.js
index 752127ae51..d38b4fab60 100644
--- a/src/alert/test/alert.spec.js
+++ b/src/alert/test/alert.spec.js
@@ -12,9 +12,10 @@ describe('uib-alert', function() {
element = angular.element(
'
' +
- '{{alert.msg}}' +
- '' +
+ '
' +
'');
scope.alerts = [
@@ -41,7 +42,7 @@ describe('uib-alert', function() {
it('should expose the controller to the view', function() {
$templateCache.put('uib/template/alert/alert.html', '
{{alert.text}}
');
- element = $compile('')(scope);
+ element = $compile('')(scope);
scope.$digest();
var ctrl = element.controller('uib-alert');
@@ -50,16 +51,16 @@ describe('uib-alert', function() {
ctrl.text = 'foo';
scope.$digest();
- expect(element.html()).toBe('foo');
+ expect(element.html()).toBe('
foo
');
});
it('should support custom templates', function() {
$templateCache.put('foo/bar.html', '
baz
');
- element = $compile('')(scope);
+ element = $compile('')(scope);
scope.$digest();
- expect(element.html()).toBe('baz');
+ expect(element.html()).toBe('
baz
');
});
it('should generate alerts using ng-repeat', function() {
@@ -67,23 +68,6 @@ describe('uib-alert', function() {
expect(alerts.length).toEqual(3);
});
- it('should use correct classes for different alert types', function() {
- var alerts = createAlerts();
- expect(alerts.eq(0)).toHaveClass('alert-success');
- expect(alerts.eq(1)).toHaveClass('alert-error');
- expect(alerts.eq(2)).toHaveClass('alert-warning');
- });
-
- it('should respect alert type binding', function() {
- var alerts = createAlerts();
- expect(alerts.eq(0)).toHaveClass('alert-success');
-
- scope.alerts[0].type = 'error';
- scope.$digest();
-
- expect(alerts.eq(0)).toHaveClass('alert-error');
- });
-
it('should show the alert content', function() {
var alerts = createAlerts();
@@ -115,22 +99,15 @@ describe('uib-alert', function() {
});
it('should not show close button and have the dismissible class if no close callback specified', function() {
- element = $compile('No close')(scope);
+ element = $compile('
No close
')(scope);
scope.$digest();
expect(findCloseButton(0)).toBeHidden();
expect(element).not.toHaveClass('alert-dismissible');
});
- it('should be possible to add additional classes for alert', function() {
- var element = $compile('Default alert!')(scope);
- scope.$digest();
- expect(element).toHaveClass('alert-block');
- expect(element).toHaveClass('alert-info');
- });
-
it('should close automatically if dismiss-on-timeout is defined on the element', function() {
scope.removeAlert = jasmine.createSpy();
- $compile('Default alert!')(scope);
+ $compile('
Default alert!
')(scope);
scope.$digest();
$timeout.flush();
@@ -140,7 +117,7 @@ describe('uib-alert', function() {
it('should not close immediately with a dynamic dismiss-on-timeout', function() {
scope.removeAlert = jasmine.createSpy();
scope.dismissTime = 500;
- $compile('Default alert!')(scope);
+ $compile('