Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

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.

Fixes #2728. Closes #2729.
  • Loading branch information
adamweeks authored and ThomasBurleson committed Jul 3, 2015
1 parent cc56141 commit 186e063
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 186e063

Please sign in to comment.