diff --git a/js/tests/models/localattachment_spec.js b/js/tests/models/localattachment_spec.js index 42f07eeed2..2d138fd2cc 100644 --- a/js/tests/models/localattachment_spec.js +++ b/js/tests/models/localattachment_spec.js @@ -53,6 +53,7 @@ define([ }); it('does not update its attributes if progress is not computable', function() { + attachment = new LocalAttachment(); /* simulate a call to 'onProgress' with some example values */ var progressEvent = { lengthComputable: false, @@ -61,9 +62,8 @@ define([ }; attachment.onProgress(progressEvent); - /* we expect the status to be 'ONGOING' and the value 0.5 (=500/1000) */ - expect(attachment.get('progress')).toBe(0.5); - expect(attachment.get('uploadStatus')).toBe(1); + expect(attachment.get('progress')).toBe(0); + expect(attachment.get('uploadStatus')).toBe(0); }); }); }); diff --git a/js/tests/util_notificationhandler_spec.js b/js/tests/util_notificationhandler_spec.js index b534b65a27..62cce22a1b 100644 --- a/js/tests/util_notificationhandler_spec.js +++ b/js/tests/util_notificationhandler_spec.js @@ -50,7 +50,6 @@ define([ return mock; } - beforeEach(function() { originalNotification = window.Notification; jasmine.clock().install(); @@ -59,6 +58,7 @@ define([ afterEach(function() { window.Notification = originalNotification; jasmine.clock().uninstall(); + notification = undefined; }); it('requests notification permissions', function() { @@ -75,7 +75,6 @@ define([ NotificationHandler.showNotification('a', 'b'); - // A new notification should have been created expect(notification).toBe(undefined); });