1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Added several usage examples, fixed bugs, turned off restore by default

This commit is contained in:
Fred Chasen 2013-07-15 22:14:52 -07:00
parent 0e08b734ec
commit 416f7ab6a0
112 changed files with 23903 additions and 3348 deletions

View file

@ -0,0 +1,39 @@
// Generated by CoffeeScript 1.6.3
describe('Annotator.Notification', function() {
var notification;
notification = null;
beforeEach(function() {
return notification = new Annotator.Notification();
});
afterEach(function() {
return notification.element.remove();
});
it('should be appended to the document.body', function() {
return assert.equal(notification.element[0].parentNode, document.body);
});
describe('.show()', function() {
var message;
message = 'This is a notification message';
beforeEach(function() {
return notification.show(message);
});
it('should have a class named "annotator-notice-show"', function() {
return assert.isTrue(notification.element.hasClass('annotator-notice-show'));
});
return it('should update the notification message', function() {
return assert.equal(notification.element.html(), message);
});
});
return describe('.hide()', function() {
beforeEach(function() {
return notification.hide();
});
return it('should not have a class named "show"', function() {
return assert.isFalse(notification.element.hasClass('show'));
});
});
});
/*
//@ sourceMappingURL=notification_spec.map
*/