Skip to content

Commit

Permalink
fix(tests): update the mdToast hide test
Browse files Browse the repository at this point in the history
In the `should hide after duration` unit test, an option value is provided to the parameter
`hideTimeout`. This option is not valid and should be `hideDelay`. The test passes
because the toast will default to hide after 3000 anyway.

angular#2728
  • Loading branch information
adamweeks committed May 5, 2015
1 parent 61b6240 commit a43c1af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/toast/toast.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@ describe('$mdToast service', function() {

it('should hide after duration', inject(function($timeout, $animate, $rootElement) {
var parent = angular.element('<div>');
var hideDelay = 1234;
setup({
template: '<md-toast />',
hideTimeout: 1234
hideDelay: hideDelay
});
expect($rootElement.find('md-toast').length).toBe(1);
$timeout.flush();
$timeout.flush(hideDelay);
expect($rootElement.find('md-toast').length).toBe(0);
}));

Expand Down

0 comments on commit a43c1af

Please sign in to comment.