Skip to content

Commit

Permalink
deprecation extension: clean-up tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobie committed Mar 23, 2009
1 parent 827e6ee commit f44d050
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions ext/update_helper/prototype_update_helper.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,37 @@ <h1>Prototype Unit test file</h1>
var actualType = log.type.beforeLast() || log.type.last();
this.assertEqual(expected, actualMessage, 'assertInfoNotified');
this.assertEqual('info', actualType, 'assertInfoNotified');
log.message.push(null);
log.type.push(null);
log.message.length = 0;
log.type.length = 0;
},

assertErrorNotified: function(expected) {
var actualMessage = log.message.beforeLast() || log.message.last();
var actualType = log.type.beforeLast() || log.type.last();
this.assertEqual(expected, actualMessage, 'assertErrorNotified');
this.assertEqual('error', actualType, 'assertErrorNotified');
log.message.push(null);
log.type.push(null);
log.message.length = 0;
log.type.length = 0;
},

assertWarnNotified: function(expected) {
var actualMessage = log.message.beforeLast() || log.message.last();
var actualType = log.type.beforeLast() || log.type.last();
this.assertEqual(expected, actualMessage, 'assertWarnNotified');
this.assertEqual('warn', actualType, 'assertWarnNotified');
log.message.push(null);
log.type.push(null);
log.message.length = 0;
log.type.length = 0;
},

assertNotNotified: function() {
this.assertNull(log.message.last(), 'assertNotNotified');
this.assertNull(log.type.last());
log.message.push(null);
log.type.push(null);
this.assertEmpty(log.message, 'assertNotNotified');
this.assertEmpty(log.type, 'assertNotNotified');
log.message.length = 0;
log.type.length = 0;
},

assertEmpty: function(array, message) {
this.assertEqual(0, array.length, message || '');
}
});

Expand Down

0 comments on commit f44d050

Please sign in to comment.