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

Commit 186e063

Browse files
adamweeksThomasBurleson
authored andcommitted
fix(tests): update the mdToast hide test
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.
1 parent cc56141 commit 186e063

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/toast/toast.spec.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,13 @@ describe('$mdToast service', function() {
150150

151151
it('should hide after duration', inject(function($timeout, $animate, $rootElement) {
152152
var parent = angular.element('<div>');
153+
var hideDelay = 1234;
153154
setup({
154155
template: '<md-toast />',
155-
hideTimeout: 1234
156+
hideDelay: hideDelay
156157
});
157158
expect($rootElement.find('md-toast').length).toBe(1);
158-
$timeout.flush();
159+
$timeout.flush(hideDelay);
159160
expect($rootElement.find('md-toast').length).toBe(0);
160161
}));
161162

0 commit comments

Comments
 (0)