Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions js/tests/models/localattachment_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
});
});
});
3 changes: 1 addition & 2 deletions js/tests/util_notificationhandler_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ define([
return mock;
}


beforeEach(function() {
originalNotification = window.Notification;
jasmine.clock().install();
Expand All @@ -59,6 +58,7 @@ define([
afterEach(function() {
window.Notification = originalNotification;
jasmine.clock().uninstall();
notification = undefined;
});

it('requests notification permissions', function() {
Expand All @@ -75,7 +75,6 @@ define([

NotificationHandler.showNotification('a', 'b');

// A new notification should have been created
expect(notification).toBe(undefined);
});

Expand Down